mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 10:52:22 +00:00
qemu: add support for splash-timeout
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1021703 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
9e1af156af
commit
adfdb8d5bd
@ -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, ',');
|
||||
|
@ -0,0 +1,15 @@
|
||||
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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user