From 2faece358316ee9f6ce755f854e30b8bccad4eac Mon Sep 17 00:00:00 2001 From: Jan Schintag Date: Wed, 11 Sep 2019 14:16:17 +0200 Subject: [PATCH] s390x: Add appendImage function to qemu_s390x.go Add appendImage function to struct qemuS390x, so that a call of appendImage results in a call to the appendBlockDevice function of qemuS390x instead of qemuArchBase. Fixes: #2043 Signed-off-by: Jan Schintag --- virtcontainers/qemu_s390x.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/virtcontainers/qemu_s390x.go b/virtcontainers/qemu_s390x.go index fc5c73c6e3..26cfb1e1a1 100644 --- a/virtcontainers/qemu_s390x.go +++ b/virtcontainers/qemu_s390x.go @@ -126,6 +126,18 @@ 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 + } + devices, err = q.appendBlockDevice(devices, drive) + if err != nil { + return nil, err + } + return devices, nil +} + func (q *qemuS390x) appendBlockDevice(devices []govmmQemu.Device, drive config.BlockDrive) ([]govmmQemu.Device, error) { d, err := genericBlockDevice(drive, false) if err != nil {