mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
qemu: snapshot: Fix snapshot function header formatting and spacing
This commit is contained in:
parent
a4065dc3e7
commit
d03044717d
@ -12185,6 +12185,7 @@ qemuDomainSnapshotFSFreeze(virQEMUDriverPtr driver,
|
|||||||
return frozen < 0 ? -2 : frozen;
|
return frozen < 0 ? -2 : frozen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return -1 on error, otherwise number of thawed filesystems. */
|
/* Return -1 on error, otherwise number of thawed filesystems. */
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotFSThaw(virQEMUDriverPtr driver,
|
qemuDomainSnapshotFSThaw(virQEMUDriverPtr driver,
|
||||||
@ -12230,6 +12231,7 @@ qemuDomainSnapshotFSThaw(virQEMUDriverPtr driver,
|
|||||||
return thawed;
|
return thawed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The domain is expected to be locked and inactive. */
|
/* The domain is expected to be locked and inactive. */
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotCreateInactiveInternal(virQEMUDriverPtr driver,
|
qemuDomainSnapshotCreateInactiveInternal(virQEMUDriverPtr driver,
|
||||||
@ -12239,6 +12241,7 @@ qemuDomainSnapshotCreateInactiveInternal(virQEMUDriverPtr driver,
|
|||||||
return qemuDomainSnapshotForEachQcow2(driver, vm, snap, "-c", false);
|
return qemuDomainSnapshotForEachQcow2(driver, vm, snap, "-c", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The domain is expected to be locked and inactive. */
|
/* The domain is expected to be locked and inactive. */
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
|
qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
|
||||||
@ -12420,6 +12423,7 @@ qemuDomainSnapshotCreateActiveInternal(virConnectPtr conn,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotPrepareDiskExternalBackingInactive(virDomainDiskDefPtr disk)
|
qemuDomainSnapshotPrepareDiskExternalBackingInactive(virDomainDiskDefPtr disk)
|
||||||
{
|
{
|
||||||
@ -12825,6 +12829,7 @@ qemuDomainSnapshotPrepare(virConnectPtr conn,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The domain is expected to hold monitor lock. */
|
/* The domain is expected to hold monitor lock. */
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
|
qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
|
||||||
@ -12943,6 +12948,7 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The domain is expected to hold monitor lock. This is the
|
/* The domain is expected to hold monitor lock. This is the
|
||||||
* counterpart to qemuDomainSnapshotCreateSingleDiskActive, called
|
* counterpart to qemuDomainSnapshotCreateSingleDiskActive, called
|
||||||
* only on a failed transaction. */
|
* only on a failed transaction. */
|
||||||
@ -12981,6 +12987,7 @@ qemuDomainSnapshotUndoSingleDiskActive(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The domain is expected to be locked and active. */
|
/* The domain is expected to be locked and active. */
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
|
qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
|
||||||
@ -13586,9 +13593,12 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
|||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qemuDomainSnapshotListNames(virDomainPtr domain, char **names,
|
|
||||||
int nameslen,
|
static int
|
||||||
unsigned int flags)
|
qemuDomainSnapshotListNames(virDomainPtr domain,
|
||||||
|
char **names,
|
||||||
|
int nameslen,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
int n = -1;
|
int n = -1;
|
||||||
@ -13611,8 +13621,10 @@ static int qemuDomainSnapshotListNames(virDomainPtr domain, char **names,
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qemuDomainSnapshotNum(virDomainPtr domain,
|
|
||||||
unsigned int flags)
|
static int
|
||||||
|
qemuDomainSnapshotNum(virDomainPtr domain,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
int n = -1;
|
int n = -1;
|
||||||
@ -13634,8 +13646,10 @@ static int qemuDomainSnapshotNum(virDomainPtr domain,
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps,
|
qemuDomainListAllSnapshots(virDomainPtr domain,
|
||||||
|
virDomainSnapshotPtr **snaps,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
@ -13658,6 +13672,7 @@ qemuDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps,
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot,
|
qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot,
|
||||||
char **names,
|
char **names,
|
||||||
@ -13689,6 +13704,7 @@ qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot,
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot,
|
qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -13717,6 +13733,7 @@ qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot,
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot,
|
qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot,
|
||||||
virDomainSnapshotPtr **snaps,
|
virDomainSnapshotPtr **snaps,
|
||||||
@ -13747,9 +13764,11 @@ qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot,
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static virDomainSnapshotPtr qemuDomainSnapshotLookupByName(virDomainPtr domain,
|
|
||||||
const char *name,
|
static virDomainSnapshotPtr
|
||||||
unsigned int flags)
|
qemuDomainSnapshotLookupByName(virDomainPtr domain,
|
||||||
|
const char *name,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
virDomainSnapshotObjPtr snap = NULL;
|
virDomainSnapshotObjPtr snap = NULL;
|
||||||
@ -13774,8 +13793,10 @@ static virDomainSnapshotPtr qemuDomainSnapshotLookupByName(virDomainPtr domain,
|
|||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qemuDomainHasCurrentSnapshot(virDomainPtr domain,
|
|
||||||
unsigned int flags)
|
static int
|
||||||
|
qemuDomainHasCurrentSnapshot(virDomainPtr domain,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -13796,6 +13817,7 @@ static int qemuDomainHasCurrentSnapshot(virDomainPtr domain,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static virDomainSnapshotPtr
|
static virDomainSnapshotPtr
|
||||||
qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
|
qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -13830,8 +13852,10 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
|
|||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
static virDomainSnapshotPtr qemuDomainSnapshotCurrent(virDomainPtr domain,
|
|
||||||
unsigned int flags)
|
static virDomainSnapshotPtr
|
||||||
|
qemuDomainSnapshotCurrent(virDomainPtr domain,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
virDomainSnapshotPtr snapshot = NULL;
|
virDomainSnapshotPtr snapshot = NULL;
|
||||||
@ -13858,8 +13882,10 @@ static virDomainSnapshotPtr qemuDomainSnapshotCurrent(virDomainPtr domain,
|
|||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
|
|
||||||
unsigned int flags)
|
static char *
|
||||||
|
qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
char *xml = NULL;
|
char *xml = NULL;
|
||||||
@ -13887,6 +13913,7 @@ static char *qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
|
|||||||
return xml;
|
return xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
|
qemuDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -13946,6 +13973,7 @@ qemuDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The domain is expected to be locked and inactive. */
|
/* The domain is expected to be locked and inactive. */
|
||||||
static int
|
static int
|
||||||
qemuDomainSnapshotRevertInactive(virQEMUDriverPtr driver,
|
qemuDomainSnapshotRevertInactive(virQEMUDriverPtr driver,
|
||||||
@ -13957,8 +13985,10 @@ qemuDomainSnapshotRevertInactive(virQEMUDriverPtr driver,
|
|||||||
return ret > 0 ? -1 : ret;
|
return ret > 0 ? -1 : ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
|
||||||
unsigned int flags)
|
static int
|
||||||
|
qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
|
virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
@ -14329,6 +14359,7 @@ struct _virQEMUSnapReparent {
|
|||||||
virDomainSnapshotObjPtr last;
|
virDomainSnapshotObjPtr last;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qemuDomainSnapshotReparentChildren(void *payload,
|
qemuDomainSnapshotReparentChildren(void *payload,
|
||||||
const void *name ATTRIBUTE_UNUSED,
|
const void *name ATTRIBUTE_UNUSED,
|
||||||
@ -14358,8 +14389,9 @@ qemuDomainSnapshotReparentChildren(void *payload,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
|
static int
|
||||||
unsigned int flags)
|
qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
|
virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user