mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
cleanup: Change datatype of disk->shared to boolean
This commit is contained in:
parent
7a984d5713
commit
a29bafd5de
@ -4639,7 +4639,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
|
|||||||
} else if (xmlStrEqual(cur->name, BAD_CAST "readonly")) {
|
} else if (xmlStrEqual(cur->name, BAD_CAST "readonly")) {
|
||||||
def->readonly = 1;
|
def->readonly = 1;
|
||||||
} else if (xmlStrEqual(cur->name, BAD_CAST "shareable")) {
|
} else if (xmlStrEqual(cur->name, BAD_CAST "shareable")) {
|
||||||
def->shared = 1;
|
def->shared = true;
|
||||||
} else if (xmlStrEqual(cur->name, BAD_CAST "transient")) {
|
} else if (xmlStrEqual(cur->name, BAD_CAST "transient")) {
|
||||||
def->transient = 1;
|
def->transient = 1;
|
||||||
} else if ((flags & VIR_DOMAIN_XML_INTERNAL_STATUS) &&
|
} else if ((flags & VIR_DOMAIN_XML_INTERNAL_STATUS) &&
|
||||||
|
@ -675,7 +675,7 @@ struct _virDomainDiskDef {
|
|||||||
int snapshot; /* enum virDomainSnapshotLocation, snapshot_conf.h */
|
int snapshot; /* enum virDomainSnapshotLocation, snapshot_conf.h */
|
||||||
int startupPolicy; /* enum virDomainStartupPolicy */
|
int startupPolicy; /* enum virDomainStartupPolicy */
|
||||||
unsigned int readonly : 1;
|
unsigned int readonly : 1;
|
||||||
unsigned int shared : 1;
|
bool shared;
|
||||||
unsigned int transient : 1;
|
unsigned int transient : 1;
|
||||||
virDomainDeviceInfo info;
|
virDomainDeviceInfo info;
|
||||||
virStorageEncryptionPtr encryption;
|
virStorageEncryptionPtr encryption;
|
||||||
|
@ -509,7 +509,7 @@ xenParseSxprDisks(virDomainDefPtr def,
|
|||||||
disk->readonly = 1;
|
disk->readonly = 1;
|
||||||
if (mode &&
|
if (mode &&
|
||||||
strchr(mode, '!'))
|
strchr(mode, '!'))
|
||||||
disk->shared = 1;
|
disk->shared = true;
|
||||||
|
|
||||||
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
|
@ -613,7 +613,7 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
|
|||||||
disk->readonly = 1;
|
disk->readonly = 1;
|
||||||
else if ((STREQ(head, "w!")) ||
|
else if ((STREQ(head, "w!")) ||
|
||||||
(STREQ(head, "!")))
|
(STREQ(head, "!")))
|
||||||
disk->shared = 1;
|
disk->shared = true;
|
||||||
|
|
||||||
/* Maintain list in sorted order according to target device name */
|
/* Maintain list in sorted order according to target device name */
|
||||||
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user