Alter the format of the code to follow more recent style guidelines of
two empty lines between functions, function decls with "[static] type"
on one line followed by function name with arguments to functions each
on one line.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/conf/storage_conf.c | 31 ++++++++++++++++++++++++++++---
src/conf/virstorageobj.c | 16 ++++++++++++++++
2 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 32fc02a..6b34cea 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -142,6 +142,7 @@ struct _virStoragePoolTypeInfo {
virStorageVolOptions volOptions;
};
+
static int
virStorageVolumeFormatFromString(const char *format)
{
@@ -151,6 +152,7 @@ virStorageVolumeFormatFromString(const char *format)
return ret;
}
+
static virStoragePoolTypeInfo poolTypeInfo[] = {
{.poolType = VIR_STORAGE_POOL_LOGICAL,
.poolOptions = {
@@ -300,6 +302,7 @@ virStoragePoolTypeInfoLookup(int type)
return NULL;
}
+
static virStoragePoolOptionsPtr
virStoragePoolOptionsForPoolType(int type)
{
@@ -309,6 +312,7 @@ virStoragePoolOptionsForPoolType(int type)
return &backend->poolOptions;
}
+
static virStorageVolOptionsPtr
virStorageVolOptionsForPoolType(int type)
{
@@ -338,6 +342,7 @@ virStorageVolDefFree(virStorageVolDefPtr def)
VIR_FREE(def);
}
+
void
virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev)
{
@@ -345,6 +350,7 @@ virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev)
VIR_FREE(dev->path);
}
+
void
virStoragePoolSourceClear(virStoragePoolSourcePtr source)
{
@@ -369,6 +375,7 @@ virStoragePoolSourceClear(virStoragePoolSourcePtr source)
VIR_FREE(source->product);
}
+
void
virStoragePoolSourceFree(virStoragePoolSourcePtr source)
{
@@ -376,6 +383,7 @@ virStoragePoolSourceFree(virStoragePoolSourcePtr source)
VIR_FREE(source);
}
+
void
virStoragePoolDefFree(virStoragePoolDefPtr def)
{
@@ -544,6 +552,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
return ret;
}
+
virStoragePoolSourcePtr
virStoragePoolDefParseSourceString(const char *srcSpec,
int pool_type)
@@ -581,6 +590,7 @@ virStoragePoolDefParseSourceString(const char *srcSpec,
return ret;
}
+
static int
virStorageDefParsePerms(xmlXPathContextPtr ctxt,
virStoragePermsPtr perms,
@@ -800,6 +810,7 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
goto cleanup;
}
+
virStoragePoolDefPtr
virStoragePoolDefParseNode(xmlDocPtr xml,
xmlNodePtr root)
@@ -828,6 +839,7 @@ virStoragePoolDefParseNode(xmlDocPtr xml,
return def;
}
+
static virStoragePoolDefPtr
virStoragePoolDefParse(const char *xmlStr,
const char *filename)
@@ -843,12 +855,14 @@ virStoragePoolDefParse(const char *xmlStr,
return ret;
}
+
virStoragePoolDefPtr
virStoragePoolDefParseString(const char *xmlStr)
{
return virStoragePoolDefParse(xmlStr, NULL);
}
+
virStoragePoolDefPtr
virStoragePoolDefParseFile(const char *filename)
{
@@ -1024,6 +1038,7 @@ virStoragePoolDefFormatBuf(virBufferPtr buf,
return 0;
}
+
char *
virStoragePoolDefFormat(virStoragePoolDefPtr def)
{
@@ -1061,6 +1076,7 @@ virStorageSize(const char *unit,
return 0;
}
+
static virStorageVolDefPtr
virStorageVolDefParseXML(virStoragePoolDefPtr pool,
xmlXPathContextPtr ctxt,
@@ -1236,6 +1252,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
goto cleanup;
}
+
virStorageVolDefPtr
virStorageVolDefParseNode(virStoragePoolDefPtr pool,
xmlDocPtr xml,
@@ -1266,6 +1283,7 @@ virStorageVolDefParseNode(virStoragePoolDefPtr pool,
return def;
}
+
static virStorageVolDefPtr
virStorageVolDefParse(virStoragePoolDefPtr pool,
const char *xmlStr,
@@ -1283,6 +1301,7 @@ virStorageVolDefParse(virStoragePoolDefPtr pool,
return ret;
}
+
virStorageVolDefPtr
virStorageVolDefParseString(virStoragePoolDefPtr pool,
const char *xmlStr,
@@ -1291,6 +1310,7 @@ virStorageVolDefParseString(virStoragePoolDefPtr pool,
return virStorageVolDefParse(pool, xmlStr, NULL, flags);
}
+
virStorageVolDefPtr
virStorageVolDefParseFile(virStoragePoolDefPtr pool,
const char *filename,
@@ -1299,6 +1319,7 @@ virStorageVolDefParseFile(virStoragePoolDefPtr pool,
return virStorageVolDefParse(pool, NULL, filename, flags);
}
+
static void
virStorageVolTimestampFormat(virBufferPtr buf, const char *name,
struct timespec *ts)
@@ -1312,6 +1333,7 @@ virStorageVolTimestampFormat(virBufferPtr buf, const char *name,
virBufferAsprintf(buf, "</%s>\n", name);
}
+
static int
virStorageVolTargetDefFormat(virStorageVolOptionsPtr options,
virBufferPtr buf,
@@ -1403,6 +1425,7 @@ virStorageVolTargetDefFormat(virStorageVolOptionsPtr options,
return 0;
}
+
char *
virStorageVolDefFormat(virStoragePoolDefPtr pool,
virStorageVolDefPtr def)
@@ -1485,9 +1508,10 @@ virStorageVolDefFormat(virStoragePoolDefPtr pool,
}
-static int virStoragePoolSaveXML(const char *path,
- virStoragePoolDefPtr def,
- const char *xml)
+static int
+virStoragePoolSaveXML(const char *path,
+ virStoragePoolDefPtr def,
+ const char *xml)
{
char uuidstr[VIR_UUID_STRING_BUFLEN];
int ret = -1;
@@ -1572,6 +1596,7 @@ virStoragePoolSourceListNewSource(virStoragePoolSourceListPtr list)
return source;
}
+
char *
virStoragePoolSourceListFormat(virStoragePoolSourceListPtr def)
{
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 5f2f947..1474838 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -56,6 +56,7 @@ virStoragePoolObjFree(virStoragePoolObjPtr obj)
VIR_FREE(obj);
}
+
void
virStoragePoolObjListFree(virStoragePoolObjListPtr pools)
{
@@ -66,6 +67,7 @@ virStoragePoolObjListFree(virStoragePoolObjListPtr pools)
pools->count = 0;
}
+
void
virStoragePoolObjRemove(virStoragePoolObjListPtr pools,
virStoragePoolObjPtr pool)
@@ -104,6 +106,7 @@ virStoragePoolObjFindByUUID(virStoragePoolObjListPtr pools,
return NULL;
}
+
virStoragePoolObjPtr
virStoragePoolObjFindByName(virStoragePoolObjListPtr pools,
const char *name)
@@ -120,6 +123,7 @@ virStoragePoolObjFindByName(virStoragePoolObjListPtr pools,
return NULL;
}
+
virStoragePoolObjPtr
virStoragePoolSourceFindDuplicateDevices(virStoragePoolObjPtr pool,
virStoragePoolDefPtr def)
@@ -136,6 +140,7 @@ virStoragePoolSourceFindDuplicateDevices(virStoragePoolObjPtr pool,
return NULL;
}
+
void
virStoragePoolObjClearVols(virStoragePoolObjPtr pool)
{
@@ -147,6 +152,7 @@ virStoragePoolObjClearVols(virStoragePoolObjPtr pool)
pool->volumes.count = 0;
}
+
virStorageVolDefPtr
virStorageVolDefFindByKey(virStoragePoolObjPtr pool,
const char *key)
@@ -160,6 +166,7 @@ virStorageVolDefFindByKey(virStoragePoolObjPtr pool,
return NULL;
}
+
virStorageVolDefPtr
virStorageVolDefFindByPath(virStoragePoolObjPtr pool,
const char *path)
@@ -173,6 +180,7 @@ virStorageVolDefFindByPath(virStoragePoolObjPtr pool,
return NULL;
}
+
virStorageVolDefPtr
virStorageVolDefFindByName(virStoragePoolObjPtr pool,
const char *name)
@@ -186,6 +194,7 @@ virStorageVolDefFindByName(virStoragePoolObjPtr pool,
return NULL;
}
+
virStoragePoolObjPtr
virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools,
virStoragePoolDefPtr def)
@@ -225,6 +234,7 @@ virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools,
return pool;
}
+
static virStoragePoolObjPtr
virStoragePoolObjLoad(virStoragePoolObjListPtr pools,
const char *file,
@@ -428,6 +438,7 @@ virStoragePoolObjSaveDef(virStorageDriverStatePtr driver,
return virStoragePoolSaveConfig(pool->configFile, def);
}
+
int
virStoragePoolObjDeleteDef(virStoragePoolObjPtr pool)
{
@@ -654,6 +665,7 @@ matchSCSIAdapterParent(virStorageAdapterSCSIHostPtr pool_scsi_host,
return false;
}
+
static bool
virStoragePoolSourceMatchSingleHost(virStoragePoolSourcePtr poolsrc,
virStoragePoolSourcePtr defsrc)
@@ -848,18 +860,21 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
return ret;
}
+
void
virStoragePoolObjLock(virStoragePoolObjPtr obj)
{
virMutexLock(&obj->lock);
}
+
void
virStoragePoolObjUnlock(virStoragePoolObjPtr obj)
{
virMutexUnlock(&obj->lock);
}
+
#define MATCH(FLAG) (flags & (FLAG))
static bool
virStoragePoolMatch(virStoragePoolObjPtr poolobj,
@@ -924,6 +939,7 @@ virStoragePoolMatch(virStoragePoolObjPtr poolobj,
}
#undef MATCH
+
int
virStoragePoolObjListExport(virConnectPtr conn,
virStoragePoolObjList poolobjs,
--
2.9.3