[libvirt] [PATCH 1/2] conf: Pass the whole device info struct to virDomainDeviceBootParseXML

Peter Krempa pkrempa at redhat.com
Thu Mar 31 14:05:02 UTC 2016


No need to extract the single element.
---
 src/conf/domain_conf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d4c78fd..3dd8119 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4816,7 +4816,7 @@ virDomainDeviceUSBMasterParseXML(xmlNodePtr node,

 static int
 virDomainDeviceBootParseXML(xmlNodePtr node,
-                            int *bootIndex,
+                            virDomainDeviceInfoPtr info,
                             virHashTablePtr bootHash)
 {
     char *order;
@@ -4848,7 +4848,7 @@ virDomainDeviceBootParseXML(xmlNodePtr node,
             goto cleanup;
     }

-    *bootIndex = boot;
+    info->bootIndex = boot;
     ret = 0;

  cleanup:
@@ -4981,7 +4981,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node,
     }

     if (boot) {
-        if (virDomainDeviceBootParseXML(boot, &info->bootIndex, bootHash))
+        if (virDomainDeviceBootParseXML(boot, info, bootHash))
             goto cleanup;
     }

-- 
2.8.0




More information about the libvir-list mailing list