From 70735dbc64bdc1331ef4bc1cb89a86232e114ee6 Mon Sep 17 00:00:00 2001 Message-Id: <70735dbc64bdc1331ef4bc1cb89a86232e114ee6@dist-git> From: Peter Krempa Date: Mon, 8 Sep 2014 13:24:19 +0200 Subject: [PATCH] qemu: snapshot: Fix snapshot function header formatting and spacing https://bugzilla.redhat.com/show_bug.cgi?id=1134154 (cherry picked from commit d03044717dd8f41991bb0eb959e7aa5fba3de79a) Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 70 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fb4b508..d02c76d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12193,6 +12193,7 @@ qemuDomainSnapshotFSFreeze(virQEMUDriverPtr driver, return frozen < 0 ? -2 : frozen; } + /* Return -1 on error, otherwise number of thawed filesystems. */ static int qemuDomainSnapshotFSThaw(virQEMUDriverPtr driver, @@ -12238,6 +12239,7 @@ qemuDomainSnapshotFSThaw(virQEMUDriverPtr driver, return thawed; } + /* The domain is expected to be locked and inactive. */ static int qemuDomainSnapshotCreateInactiveInternal(virQEMUDriverPtr driver, @@ -12247,6 +12249,7 @@ qemuDomainSnapshotCreateInactiveInternal(virQEMUDriverPtr driver, return qemuDomainSnapshotForEachQcow2(driver, vm, snap, "-c", false); } + /* The domain is expected to be locked and inactive. */ static int qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver, @@ -12428,6 +12431,7 @@ qemuDomainSnapshotCreateActiveInternal(virConnectPtr conn, return ret; } + static int qemuDomainSnapshotPrepareDiskExternalBackingInactive(virDomainDiskDefPtr disk) { @@ -12833,6 +12837,7 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, return ret; } + /* The domain is expected to hold monitor lock. */ static int qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver, @@ -12951,6 +12956,7 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver, return ret; } + /* The domain is expected to hold monitor lock. This is the * counterpart to qemuDomainSnapshotCreateSingleDiskActive, called * only on a failed transaction. */ @@ -12989,6 +12995,7 @@ qemuDomainSnapshotUndoSingleDiskActive(virQEMUDriverPtr driver, } } + /* The domain is expected to be locked and active. */ static int qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver, @@ -13594,9 +13601,12 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain, return snapshot; } -static int qemuDomainSnapshotListNames(virDomainPtr domain, char **names, - int nameslen, - unsigned int flags) + +static int +qemuDomainSnapshotListNames(virDomainPtr domain, + char **names, + int nameslen, + unsigned int flags) { virDomainObjPtr vm = NULL; int n = -1; @@ -13619,8 +13629,10 @@ static int qemuDomainSnapshotListNames(virDomainPtr domain, char **names, return n; } -static int qemuDomainSnapshotNum(virDomainPtr domain, - unsigned int flags) + +static int +qemuDomainSnapshotNum(virDomainPtr domain, + unsigned int flags) { virDomainObjPtr vm = NULL; int n = -1; @@ -13642,8 +13654,10 @@ static int qemuDomainSnapshotNum(virDomainPtr domain, return n; } + static int -qemuDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps, +qemuDomainListAllSnapshots(virDomainPtr domain, + virDomainSnapshotPtr **snaps, unsigned int flags) { virDomainObjPtr vm = NULL; @@ -13666,6 +13680,7 @@ qemuDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps, return n; } + static int qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, char **names, @@ -13697,6 +13712,7 @@ qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, return n; } + static int qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, unsigned int flags) @@ -13725,6 +13741,7 @@ qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, return n; } + static int qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, virDomainSnapshotPtr **snaps, @@ -13755,9 +13772,11 @@ qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, return n; } -static virDomainSnapshotPtr qemuDomainSnapshotLookupByName(virDomainPtr domain, - const char *name, - unsigned int flags) + +static virDomainSnapshotPtr +qemuDomainSnapshotLookupByName(virDomainPtr domain, + const char *name, + unsigned int flags) { virDomainObjPtr vm; virDomainSnapshotObjPtr snap = NULL; @@ -13782,8 +13801,10 @@ static virDomainSnapshotPtr qemuDomainSnapshotLookupByName(virDomainPtr domain, return snapshot; } -static int qemuDomainHasCurrentSnapshot(virDomainPtr domain, - unsigned int flags) + +static int +qemuDomainHasCurrentSnapshot(virDomainPtr domain, + unsigned int flags) { virDomainObjPtr vm; int ret = -1; @@ -13804,6 +13825,7 @@ static int qemuDomainHasCurrentSnapshot(virDomainPtr domain, return ret; } + static virDomainSnapshotPtr qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) @@ -13838,8 +13860,10 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, return parent; } -static virDomainSnapshotPtr qemuDomainSnapshotCurrent(virDomainPtr domain, - unsigned int flags) + +static virDomainSnapshotPtr +qemuDomainSnapshotCurrent(virDomainPtr domain, + unsigned int flags) { virDomainObjPtr vm; virDomainSnapshotPtr snapshot = NULL; @@ -13866,8 +13890,10 @@ static virDomainSnapshotPtr qemuDomainSnapshotCurrent(virDomainPtr domain, return snapshot; } -static char *qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, - unsigned int flags) + +static char * +qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, + unsigned int flags) { virDomainObjPtr vm = NULL; char *xml = NULL; @@ -13895,6 +13921,7 @@ static char *qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, return xml; } + static int qemuDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, unsigned int flags) @@ -13954,6 +13981,7 @@ qemuDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, return ret; } + /* The domain is expected to be locked and inactive. */ static int qemuDomainSnapshotRevertInactive(virQEMUDriverPtr driver, @@ -13965,8 +13993,10 @@ qemuDomainSnapshotRevertInactive(virQEMUDriverPtr driver, 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; virDomainObjPtr vm = NULL; @@ -14337,6 +14367,7 @@ struct _virQEMUSnapReparent { virDomainSnapshotObjPtr last; }; + static void qemuDomainSnapshotReparentChildren(void *payload, const void *name ATTRIBUTE_UNUSED, @@ -14366,8 +14397,9 @@ qemuDomainSnapshotReparentChildren(void *payload, } -static int qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot, - unsigned int flags) +static int +qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot, + unsigned int flags) { virQEMUDriverPtr driver = snapshot->domain->conn->privateData; virDomainObjPtr vm = NULL; -- 2.1.0