[libvirt PATCH v3 12/51] conf: Use virTristateXXX in virStorageAdapterFCHost

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/storage_adapter_conf.c | 4 +++-
 src/conf/storage_adapter_conf.h | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/conf/storage_adapter_conf.c b/src/conf/storage_adapter_conf.c
index 77ecb8d5f2..69062b4b58 100644
--- a/src/conf/storage_adapter_conf.c
+++ b/src/conf/storage_adapter_conf.c
@@ -68,13 +68,15 @@ virStorageAdapterParseXMLFCHost(xmlNodePtr node,
 
     fchost->parent = virXMLPropString(node, "parent");
     if ((managed = virXMLPropString(node, "managed"))) {
-        if ((fchost->managed = virTristateBoolTypeFromString(managed)) < 0) {
+        int value;
+        if ((value = virTristateBoolTypeFromString(managed)) < 0) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("unknown fc_host managed setting '%s'"),
                            managed);
             VIR_FREE(managed);
             return -1;
         }
+        fchost->managed = value;
     }
 
     fchost->parent_wwnn = virXMLPropString(node, "parent_wwnn");
diff --git a/src/conf/storage_adapter_conf.h b/src/conf/storage_adapter_conf.h
index 4c7da7c8d9..3f64cda9af 100644
--- a/src/conf/storage_adapter_conf.h
+++ b/src/conf/storage_adapter_conf.h
@@ -51,7 +51,7 @@ struct _virStorageAdapterFCHost {
     char *parent_fabric_wwn;
     char *wwnn;
     char *wwpn;
-    int managed;        /* enum virTristateSwitch */
+    virTristateBool managed;
 };
 
 typedef struct _virStorageAdapter virStorageAdapter;
-- 
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