[libvirt PATCH v2 27/51] domain_conf: Use virXMLPropTristateXXX in virDomainChrSourceDefParseFile

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

 



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

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9822f4f451..fd7613a479 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11778,17 +11778,11 @@ static int
 virDomainChrSourceDefParseFile(virDomainChrSourceDefPtr def,
                                xmlNodePtr source)
 {
-    g_autofree char *append = NULL;
-
     def->data.file.path = virXMLPropString(source, "path");
 
-    if ((append = virXMLPropString(source, "append")) &&
-        (def->data.file.append = virTristateSwitchTypeFromString(append)) <= 0) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Invalid append attribute value '%s'"),
-                       append);
+    if (virXMLPropTristateSwitch(source, "append", false,
+                                 &def->data.file.append) < 0)
         return -1;
-    }
 
     return 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