]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Fail if per-device boot is used but deviceboot is not supported
authorJiri Denemark <jdenemar@redhat.com>
Tue, 18 Jan 2011 09:04:21 +0000 (10:04 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 19 Jan 2011 14:01:52 +0000 (15:01 +0100)
src/qemu/qemu_command.c

index 24acc10894e16050d536b98c36e09acdd20513ca..537e5370b9419998af2f07e8d5d24dd8c6b31e79 100644 (file)
@@ -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)