Merge pull request #2385 from alicefr/fix-refactoring

s390x: fix refactoring
This commit is contained in:
Graham Whaley 2020-02-05 10:07:32 +00:00 committed by GitHub
commit 4ee2f8c5b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,19 @@ func (q *qemuS390x) appendConsole(devices []govmmQemu.Device, path string) ([]go
return devices, nil
}
func (q *qemuS390x) appendImage(devices []govmmQemu.Device, path string) ([]govmmQemu.Device, error) {
drive, err := genericImage(path)
if err != nil {
return nil, err
}
return q.appendCCWBlockDevice(devices, drive)
}
func (q *qemuS390x) appendBlockDevice(devices []govmmQemu.Device, drive config.BlockDrive) ([]govmmQemu.Device, error) {
return q.appendCCWBlockDevice(devices, drive)
}
func (q *qemuS390x) appendCCWBlockDevice(devices []govmmQemu.Device, drive config.BlockDrive) ([]govmmQemu.Device, error) {
d, err := genericBlockDevice(drive, false)
if err != nil {
return devices, fmt.Errorf("Failed to append blk-dev %v", err)