qemu: Always assume QEMU_CAPS_SPLASH_TIMEOUT

Supported since qemu commit 3d3b8303c6 ("showing a splash picture when
start") released in qemu-v1.0 and can't be compiled out.

Assume that it's present and remove the validation code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-08-09 13:15:11 +02:00
parent c561268806
commit 9216090cf1
3 changed files with 5 additions and 17 deletions

View File

@ -566,8 +566,7 @@ qemuValidateDomainDefPM(const virDomainDef *def,
static int
qemuValidateDomainDefBoot(const virDomainDef *def,
virQEMUCaps *qemuCaps)
qemuValidateDomainDefBoot(const virDomainDef *def)
{
if (def->os.loader &&
def->os.loader->secure == VIR_TRISTATE_BOOL_YES) {
@ -598,15 +597,6 @@ qemuValidateDomainDefBoot(const virDomainDef *def,
}
}
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"));
return -1;
}
}
return 0;
}
@ -1218,7 +1208,7 @@ qemuValidateDomainDef(const virDomainDef *def,
if (qemuValidateDomainDefPM(def, qemuCaps) < 0)
return -1;
if (qemuValidateDomainDefBoot(def, qemuCaps) < 0)
if (qemuValidateDomainDefBoot(def) < 0)
return -1;
if (qemuValidateDomainVCpuTopology(def, qemuCaps) < 0)

View File

@ -1068,10 +1068,8 @@ mymain(void)
QEMU_CAPS_ICH9_AHCI);
DO_TEST_NOCAPS("boot-multi");
DO_TEST_NOCAPS("boot-menu-enable");
DO_TEST("boot-menu-enable-with-timeout",
QEMU_CAPS_SPLASH_TIMEOUT);
DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout-invalid",
QEMU_CAPS_SPLASH_TIMEOUT);
DO_TEST_NOCAPS("boot-menu-enable-with-timeout");
DO_TEST_PARSE_ERROR_NOCAPS("boot-menu-enable-with-timeout-invalid");
DO_TEST_NOCAPS("boot-menu-disable");
DO_TEST_NOCAPS("boot-menu-disable-drive");
DO_TEST_PARSE_ERROR("boot-dev+order",

View File

@ -228,7 +228,7 @@ mymain(void)
QEMU_CAPS_DEVICE_IOH3420,
QEMU_CAPS_ICH9_AHCI);
DO_TEST_NOCAPS("boot-multi");
DO_TEST("boot-menu-enable-with-timeout", QEMU_CAPS_SPLASH_TIMEOUT);
DO_TEST_NOCAPS("boot-menu-enable-with-timeout");
DO_TEST_NOCAPS("boot-menu-disable");
DO_TEST_NOCAPS("boot-menu-disable-with-timeout");
DO_TEST_NOCAPS("boot-order");