mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 10:03:49 +03:00
conf: Always parse firmware features
Regardless of whether firmware autoselection is in use, we still want to parse the list of requested features. Doing this will allow us to produce better error messages. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
de2a338dce
commit
c4b8124e45
@ -18439,20 +18439,6 @@ virDomainDefParseBootFirmwareOptions(virDomainDef *def,
|
||||
int n = 0;
|
||||
size_t i;
|
||||
|
||||
if (!firmware)
|
||||
return 0;
|
||||
|
||||
fw = virDomainOsDefFirmwareTypeFromString(firmware);
|
||||
|
||||
if (fw <= 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("unknown firmware value %s"),
|
||||
firmware);
|
||||
return -1;
|
||||
}
|
||||
|
||||
def->os.firmware = fw;
|
||||
|
||||
if ((n = virXPathNodeSet("./os/firmware/feature", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
|
||||
@ -18479,6 +18465,20 @@ virDomainDefParseBootFirmwareOptions(virDomainDef *def,
|
||||
|
||||
def->os.firmwareFeatures = g_steal_pointer(&features);
|
||||
|
||||
if (!firmware)
|
||||
return 0;
|
||||
|
||||
fw = virDomainOsDefFirmwareTypeFromString(firmware);
|
||||
|
||||
if (fw <= 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("unknown firmware value %s"),
|
||||
firmware);
|
||||
return -1;
|
||||
}
|
||||
|
||||
def->os.firmware = fw;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user