[libvirt] [PATCH 8/8] cleanup: Change datatype of fs->readonly to boolean

Osier Yang jyang at redhat.com
Wed Apr 10 16:32:32 UTC 2013


---
 src/conf/domain_conf.c | 2 +-
 src/conf/domain_conf.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index afd4467..9f8687e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5489,7 +5489,7 @@ virDomainFSDefParseXML(xmlNodePtr node,
                        xmlStrEqual(cur->name, BAD_CAST "target")) {
                 target = virXMLPropString(cur, "dir");
             } else if (xmlStrEqual(cur->name, BAD_CAST "readonly")) {
-                def->readonly = 1;
+                def->readonly = true;
             } else if (!fsdriver && xmlStrEqual(cur->name, BAD_CAST "driver")) {
                 fsdriver = virXMLPropString(cur, "type");
                 wrpolicy = virXMLPropString(cur, "wrpolicy");
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 51e605a..78a6c16 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -807,7 +807,7 @@ struct _virDomainFSDef {
     unsigned long long usage;
     char *src;
     char *dst;
-    unsigned int readonly : 1;
+    bool readonly;
     virDomainDeviceInfo info;
     unsigned long long space_hard_limit; /* in bytes */
     unsigned long long space_soft_limit; /* in bytes */
-- 
1.8.1.4




More information about the libvir-list mailing list