[libvirt PATCH 23/28] conf: Always parse firmware features

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7947b1f5e6..fb8bf4cfec 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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;
 }
 
-- 
2.35.3




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux