From: Jiri Denemark Date: Tue, 18 Jan 2011 09:04:21 +0000 (+0100) Subject: qemu: Fail if per-device boot is used but deviceboot is not supported X-Git-Tag: v0.8.8~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45c02ee06fca418158e47c1e8096adcff6890818;p=thirdparty%2Flibvirt.git qemu: Fail if per-device boot is used but deviceboot is not supported --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 24acc10894..537e5370b9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2949,6 +2949,13 @@ qemuBuildCommandLine(virConnectPtr conn, } virCommandAddArgBuffer(cmd, &boot_buf); + } else if (!(qemuCmdFlags & QEMUD_CMD_FLAG_BOOTINDEX)) { + /* def->os.nBootDevs is guaranteed to be > 0 unless per-device boot + * configuration is used + */ + qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("hypervisor lacks deviceboot feature")); + goto error; } if (def->os.kernel)