]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
cleanup: Change datatype of disk->shared to boolean
authorOsier Yang <jyang@redhat.com>
Wed, 10 Apr 2013 10:59:44 +0000 (18:59 +0800)
committerOsier Yang <jyang@redhat.com>
Thu, 11 Apr 2013 03:36:37 +0000 (11:36 +0800)
src/conf/domain_conf.c
src/conf/domain_conf.h
src/xenxs/xen_sxpr.c
src/xenxs/xen_xm.c

index 30a65e75dfd4c5be2ccce061e4f8dfeea0e5f27b..4362716007037b38e512cb25d635ad8f68f45e7f 100644 (file)
@@ -4639,7 +4639,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
             } else if (xmlStrEqual(cur->name, BAD_CAST "readonly")) {
                 def->readonly = 1;
             } else if (xmlStrEqual(cur->name, BAD_CAST "shareable")) {
-                def->shared = 1;
+                def->shared = true;
             } else if (xmlStrEqual(cur->name, BAD_CAST "transient")) {
                 def->transient = 1;
             } else if ((flags & VIR_DOMAIN_XML_INTERNAL_STATUS) &&
index d046c1002c55f61d13d6608611328d2fa3d148f2..8173cb4c2b6594b78d5c88a206d81c10f96febb7 100644 (file)
@@ -675,7 +675,7 @@ struct _virDomainDiskDef {
     int snapshot; /* enum virDomainSnapshotLocation, snapshot_conf.h */
     int startupPolicy; /* enum virDomainStartupPolicy */
     unsigned int readonly : 1;
-    unsigned int shared : 1;
+    bool shared;
     unsigned int transient : 1;
     virDomainDeviceInfo info;
     virStorageEncryptionPtr encryption;
index 7ed148276ab35669d5d014f6f60b9f670813b9ea..4bd1f47bf1f6f38944668fe3030ecdaab12d76f1 100644 (file)
@@ -509,7 +509,7 @@ xenParseSxprDisks(virDomainDefPtr def,
                 disk->readonly = 1;
             if (mode &&
                 strchr(mode, '!'))
-                disk->shared = 1;
+                disk->shared = true;
 
             if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
                 goto no_memory;
index 14e26c313037c0030f15828e246f7e6ef19cc267..c68bee0556b37fbc24343df12ab8e124d9a370f8 100644 (file)
@@ -613,7 +613,7 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
                 disk->readonly = 1;
             else if ((STREQ(head, "w!")) ||
                      (STREQ(head, "!")))
-                disk->shared = 1;
+                disk->shared = true;
 
             /* Maintain list in sorted order according to target device name */
             if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)