mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-30 13:37:17 +00:00
storage: Convert 'building' into a bool
Rather than a unsigned int, use a 'bool' since that's how it was used.
This commit is contained in:
parent
325f98aa75
commit
10087386b9
@ -63,7 +63,7 @@ struct _virStorageVolDef {
|
|||||||
char *key;
|
char *key;
|
||||||
int type; /* virStorageVolType */
|
int type; /* virStorageVolType */
|
||||||
|
|
||||||
unsigned int building;
|
bool building;
|
||||||
unsigned int in_use;
|
unsigned int in_use;
|
||||||
|
|
||||||
virStorageVolSource source;
|
virStorageVolSource source;
|
||||||
|
@ -1691,7 +1691,7 @@ storageVolCreateXML(virStoragePoolPtr obj,
|
|||||||
|
|
||||||
/* Drop the pool lock during volume allocation */
|
/* Drop the pool lock during volume allocation */
|
||||||
pool->asyncjobs++;
|
pool->asyncjobs++;
|
||||||
voldef->building = 1;
|
voldef->building = true;
|
||||||
virStoragePoolObjUnlock(pool);
|
virStoragePoolObjUnlock(pool);
|
||||||
|
|
||||||
buildret = backend->buildVol(obj->conn, pool, buildvoldef, flags);
|
buildret = backend->buildVol(obj->conn, pool, buildvoldef, flags);
|
||||||
@ -1700,7 +1700,7 @@ storageVolCreateXML(virStoragePoolPtr obj,
|
|||||||
virStoragePoolObjLock(pool);
|
virStoragePoolObjLock(pool);
|
||||||
storageDriverUnlock(driver);
|
storageDriverUnlock(driver);
|
||||||
|
|
||||||
voldef->building = 0;
|
voldef->building = false;
|
||||||
pool->asyncjobs--;
|
pool->asyncjobs--;
|
||||||
|
|
||||||
if (buildret < 0) {
|
if (buildret < 0) {
|
||||||
@ -1858,7 +1858,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr obj,
|
|||||||
|
|
||||||
/* Drop the pool lock during volume allocation */
|
/* Drop the pool lock during volume allocation */
|
||||||
pool->asyncjobs++;
|
pool->asyncjobs++;
|
||||||
newvol->building = 1;
|
newvol->building = true;
|
||||||
origvol->in_use++;
|
origvol->in_use++;
|
||||||
virStoragePoolObjUnlock(pool);
|
virStoragePoolObjUnlock(pool);
|
||||||
|
|
||||||
@ -1876,7 +1876,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr obj,
|
|||||||
storageDriverUnlock(driver);
|
storageDriverUnlock(driver);
|
||||||
|
|
||||||
origvol->in_use--;
|
origvol->in_use--;
|
||||||
newvol->building = 0;
|
newvol->building = false;
|
||||||
allocation = newvol->target.allocation;
|
allocation = newvol->target.allocation;
|
||||||
pool->asyncjobs--;
|
pool->asyncjobs--;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user