[libvirt PATCH v3 41/51] domain_conf: Use virXMLPropTristateXXX in virDomainVsockDefParseXML

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c7d2e86dfe..3289c9fa12 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15841,17 +15841,8 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt,
             }
         }
 
-        VIR_FREE(tmp);
-        if ((tmp = virXMLPropString(cid, "auto"))) {
-            val = virTristateBoolTypeFromString(tmp);
-            if (val <= 0) {
-                virReportError(VIR_ERR_XML_DETAIL,
-                               _("'auto' attribute can be 'yes' or 'no': %s"),
-                               tmp);
-                return NULL;
-            }
-            vsock->auto_cid = val;
-        }
+        if (virXMLPropTristateBool(cid, "auto", false, &vsock->auto_cid) < 0)
+            return NULL;
     }
 
     if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &vsock->info, flags) < 0)
-- 
2.26.2




[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