Cast disk->bus to proper type and add missing values to the enum so it's more obvious what types are supported.
Signed-off-by: Peter Krempa <pkre...@redhat.com> --- src/qemu/qemu_command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 352e474d90..d85580b857 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1893,7 +1893,7 @@ qemuBuildDiskDeviceStr(const virDomainDef *def, if (disk->iothread && !qemuCheckIOThreads(def, disk)) goto error; - switch (disk->bus) { + switch ((virDomainDiskBus) disk->bus) { case VIR_DOMAIN_DISK_BUS_IDE: if (disk->info.addr.drive.target != 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -2115,6 +2115,10 @@ qemuBuildDiskDeviceStr(const virDomainDef *def, virBufferAsprintf(&opt, "floppy,unit=%d", disk->info.addr.drive.unit); break; + case VIR_DOMAIN_DISK_BUS_XEN: + case VIR_DOMAIN_DISK_BUS_UML: + case VIR_DOMAIN_DISK_BUS_SD: + case VIR_DOMAIN_DISK_BUS_LAST: default: virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported disk bus '%s' with device setup"), bus); -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list