mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: Assume QEMU_CAPS_FW_CFG
qemu supports this since 81b2b81062 ("fw_cfg: insert fw_cfg file blobs via qemu cmdline") released in qemu-v2.4.0 and it can't be compiled out. Assume that the option always works and remove the corresponding check. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
04e5b3134f
commit
22c681256b
@ -886,18 +886,10 @@ qemuValidateDomainDefConsole(const virDomainDef *def,
|
||||
|
||||
|
||||
static int
|
||||
qemuValidateDomainDefSysinfo(const virSysinfoDef *def,
|
||||
virQEMUCaps *qemuCaps)
|
||||
qemuValidateDomainDefSysinfo(const virSysinfoDef *def)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (def->type == VIR_SYSINFO_FWCFG &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_FW_CFG)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("fw_cfg is not supported with this QEMU"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < def->nfw_cfgs; i++) {
|
||||
const virSysinfoFWCfgDef *f = &def->fw_cfgs[i];
|
||||
|
||||
@ -1239,7 +1231,7 @@ qemuValidateDomainDef(const virDomainDef *def,
|
||||
}
|
||||
|
||||
for (i = 0; i < def->nsysinfo; i++) {
|
||||
if (qemuValidateDomainDefSysinfo(def->sysinfo[i], qemuCaps) < 0)
|
||||
if (qemuValidateDomainDefSysinfo(def->sysinfo[i]) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1863,7 +1863,7 @@ mymain(void)
|
||||
DO_TEST_NOCAPS("smbios");
|
||||
DO_TEST_PARSE_ERROR_NOCAPS("smbios-date");
|
||||
DO_TEST_PARSE_ERROR_NOCAPS("smbios-uuid-match");
|
||||
DO_TEST("smbios-type-fwcfg", QEMU_CAPS_FW_CFG);
|
||||
DO_TEST_NOCAPS("smbios-type-fwcfg");
|
||||
|
||||
DO_TEST_NOCAPS("watchdog");
|
||||
DO_TEST_NOCAPS("watchdog-device");
|
||||
|
@ -1107,7 +1107,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_IVSHMEM_PLAIN, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL);
|
||||
DO_TEST_NOCAPS("smbios");
|
||||
DO_TEST_NOCAPS("smbios-multiple-type2");
|
||||
DO_TEST("smbios-type-fwcfg", QEMU_CAPS_FW_CFG);
|
||||
DO_TEST_NOCAPS("smbios-type-fwcfg");
|
||||
|
||||
DO_TEST_CAPS_LATEST("os-firmware-bios");
|
||||
DO_TEST_CAPS_LATEST("os-firmware-efi");
|
||||
|
Loading…
Reference in New Issue
Block a user