From 9e1af156af45d6e0b5525afc10ff59589081cc5a Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Fri, 22 Aug 2014 13:42:46 +0200 Subject: [PATCH] qemu: add capability probing for splash-timeout Signed-off-by: Martin Kletzander --- src/qemu/qemu_capabilities.c | 5 +++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_1.5.3-1.caps | 1 + tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 1 + tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 1 + tests/qemuhelptest.c | 12 ++++++++---- 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b758b5a0d4..410086b2c6 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -266,6 +266,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "memory-backend-file", "usb-audio", "rtc-reset-reinjection", + + "splash-timeout", /* 175 */ ); @@ -1132,6 +1134,8 @@ virQEMUCapsComputeCmdFlags(const char *help, virQEMUCapsSet(qemuCaps, QEMU_CAPS_BOOT_MENU); if (strstr(help, ",reboot-timeout=rb_time")) virQEMUCapsSet(qemuCaps, QEMU_CAPS_REBOOT_TIMEOUT); + if (strstr(help, ",splash-time=sp_time")) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_SPLASH_TIMEOUT); if ((fsdev = strstr(help, "-fsdev"))) { virQEMUCapsSet(qemuCaps, QEMU_CAPS_FSDEV); if (strstr(fsdev, "readonly")) @@ -2431,6 +2435,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { { "realtime", "mlock", QEMU_CAPS_MLOCK }, { "boot-opts", "strict", QEMU_CAPS_BOOT_STRICT }, { "boot-opts", "reboot-timeout", QEMU_CAPS_REBOOT_TIMEOUT }, + { "boot-opts", "splash-time", QEMU_CAPS_SPLASH_TIMEOUT }, { "spice", "disable-agent-file-xfer", QEMU_CAPS_SPICE_FILE_XFER_DISABLE }, { "msg", "timestamp", QEMU_CAPS_MSG_TIMESTAMP }, { "numa", NULL, QEMU_CAPS_NUMA }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index cbd3646c30..48a4eaa2dc 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -214,6 +214,7 @@ typedef enum { QEMU_CAPS_OBJECT_MEMORY_FILE = 172, /* -object memory-backend-file */ QEMU_CAPS_OBJECT_USB_AUDIO = 173, /* usb-audio device support */ QEMU_CAPS_RTC_RESET_REINJECTION = 174, /* rtc-reset-reinjection monitor command */ + QEMU_CAPS_SPLASH_TIMEOUT = 175, /* -boot splash-time */ QEMU_CAPS_LAST, /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_1.5.3-1.caps b/tests/qemucapabilitiesdata/caps_1.5.3-1.caps index 5fa30aa8e8..c220b4670c 100644 --- a/tests/qemucapabilitiesdata/caps_1.5.3-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.5.3-1.caps @@ -138,4 +138,5 @@ + diff --git a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps index f364bbf1ad..e10f030d95 100644 --- a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps @@ -145,4 +145,5 @@ + diff --git a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps index 10ce1b5d21..44f7b0c3ca 100644 --- a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps @@ -144,4 +144,5 @@ + diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 366e36def9..975edf3cef 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -745,7 +745,8 @@ mymain(void) QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX, QEMU_CAPS_DEVICE_USB_KBD, - QEMU_CAPS_DEVICE_USB_STORAGE); + QEMU_CAPS_DEVICE_USB_STORAGE, + QEMU_CAPS_SPLASH_TIMEOUT); DO_TEST("qemu-1.1.0", 1001000, 0, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -843,7 +844,8 @@ mymain(void) QEMU_CAPS_VNC_SHARE_POLICY, QEMU_CAPS_DEVICE_USB_KBD, QEMU_CAPS_DEVICE_USB_STORAGE, - QEMU_CAPS_OBJECT_USB_AUDIO); + QEMU_CAPS_OBJECT_USB_AUDIO, + QEMU_CAPS_SPLASH_TIMEOUT); DO_TEST("qemu-1.2.0", 1002000, 0, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -953,7 +955,8 @@ mymain(void) QEMU_CAPS_DEVICE_USB_STORAGE, QEMU_CAPS_DEVICE_USB_KBD, QEMU_CAPS_USB_STORAGE_REMOVABLE, - QEMU_CAPS_OBJECT_USB_AUDIO); + QEMU_CAPS_OBJECT_USB_AUDIO, + QEMU_CAPS_SPLASH_TIMEOUT); DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -1068,7 +1071,8 @@ mymain(void) QEMU_CAPS_DEVICE_USB_STORAGE, QEMU_CAPS_DEVICE_USB_KBD, QEMU_CAPS_USB_STORAGE_REMOVABLE, - QEMU_CAPS_OBJECT_USB_AUDIO); + QEMU_CAPS_OBJECT_USB_AUDIO, + QEMU_CAPS_SPLASH_TIMEOUT); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }