[libvirt PATCH v3 37/51] domain_conf: Use virXMLPropTristateXXX in virDomainShmemDefParseXML

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

 



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

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6b98d34eb4..ef1a9cdab2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14358,17 +14358,9 @@ virDomainShmemDefParseXML(virDomainXMLOptionPtr xmlopt,
         }
         VIR_FREE(tmp);
 
-        if ((tmp = virXMLPropString(msi, "ioeventfd"))) {
-            int val;
-
-            if ((val = virTristateSwitchTypeFromString(tmp)) <= 0) {
-                virReportError(VIR_ERR_XML_ERROR,
-                               _("invalid msi ioeventfd setting for shmem: '%s'"),
-                               tmp);
-                goto cleanup;
-            }
-            def->msi.ioeventfd = val;
-        }
+        if (virXMLPropTristateSwitch(msi, "ioeventfd", false,
+                                     &def->msi.ioeventfd) < 0)
+            goto cleanup;
     }
 
     /* msi option is only relevant with a server */
-- 
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