提交 adfdb8d5 编写于 作者: M Martin Kletzander

qemu: add support for splash-timeout

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1021703Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 9e1af156
......@@ -7927,6 +7927,21 @@ qemuBuildCommandLine(virConnectPtr conn,
def->os.bios.rt_delay);
}
if (def->os.bm_timeout_set) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPLASH_TIMEOUT)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("splash timeout is not supported "
"by this QEMU binary"));
virBufferFreeAndReset(&boot_buf);
goto error;
}
if (boot_nparams++)
virBufferAddChar(&boot_buf, ',');
virBufferAsprintf(&boot_buf, "splash-time=%u", def->os.bm_timeout);
}
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOT_STRICT)) {
if (boot_nparams++)
virBufferAddChar(&boot_buf, ',');
......
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu \
-S \
-M pc \
-m 214 \
-smp 1 \
-nographic \
-nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi \
-boot order=d,menu=on,splash-time=3000 \
-usb \
-drive file=/dev/cdrom,if=none,media=cdrom,id=drive-ide0-1-0 \
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
......@@ -607,6 +607,10 @@ mymain(void)
DO_TEST("boot-menu-enable",
QEMU_CAPS_BOOT_MENU, QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
QEMU_CAPS_BOOTINDEX);
DO_TEST("boot-menu-enable-with-timeout",
QEMU_CAPS_BOOT_MENU, QEMU_CAPS_DEVICE,
QEMU_CAPS_DRIVE, QEMU_CAPS_SPLASH_TIMEOUT);
DO_TEST_FAILURE("boot-menu-enable-with-timeout", QEMU_CAPS_BOOT_MENU);
DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout-invalid", NONE);
DO_TEST("boot-menu-disable", QEMU_CAPS_BOOT_MENU);
DO_TEST("boot-menu-disable-drive",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册