Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
s390x: fix refactoring
Browse files Browse the repository at this point in the history
On s390x we need to set the devno that's why we need a custom
appendBlkDevice function.

Fixes: #2384

Signed-off-by: Alice Frosi <[email protected]>
  • Loading branch information
Alice Frosi committed Jan 9, 2020
1 parent 3ea3d32 commit 3594855
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions virtcontainers/qemu_s390x.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3594855

Please sign in to comment.