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 | 34 +++++++++++++++++++++++++++++++---
src/conf/virstorageobj.c | 17 +++++++++++++++++
2 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 58682d1..3dce6e6 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -145,6 +145,7 @@ struct _virStoragePoolTypeInfo {
virStorageVolOptions volOptions;
};
+
static int
virStorageVolumeFormatFromString(const char *format)
{
@@ -154,6 +155,7 @@ virStorageVolumeFormatFromString(const char *format)
return ret;
}
+
static virStoragePoolTypeInfo poolTypeInfo[] = {
{.poolType = VIR_STORAGE_POOL_LOGICAL,
.poolOptions = {
@@ -303,6 +305,7 @@ virStoragePoolTypeInfoLookup(int type)
return NULL;
}
+
static virStoragePoolOptionsPtr
virStoragePoolOptionsForPoolType(int type)
{
@@ -312,6 +315,7 @@ virStoragePoolOptionsForPoolType(int type)
return &backend->poolOptions;
}
+
static virStorageVolOptionsPtr
virStorageVolOptionsForPoolType(int type)
{
@@ -341,6 +345,7 @@ virStorageVolDefFree(virStorageVolDefPtr def)
VIR_FREE(def);
}
+
static void
virStoragePoolSourceAdapterClear(virStoragePoolSourceAdapterPtr adapter)
{
@@ -357,6 +362,7 @@ virStoragePoolSourceAdapterClear(virStoragePoolSourceAdapterPtr
adapter)
}
}
+
void
virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev)
{
@@ -364,6 +370,7 @@ virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev)
VIR_FREE(dev->path);
}
+
void
virStoragePoolSourceClear(virStoragePoolSourcePtr source)
{
@@ -388,6 +395,7 @@ virStoragePoolSourceClear(virStoragePoolSourcePtr source)
VIR_FREE(source->product);
}
+
void
virStoragePoolSourceFree(virStoragePoolSourcePtr source)
{
@@ -395,6 +403,7 @@ virStoragePoolSourceFree(virStoragePoolSourcePtr source)
VIR_FREE(source);
}
+
void
virStoragePoolDefFree(virStoragePoolDefPtr def)
{
@@ -666,6 +675,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
return ret;
}
+
virStoragePoolSourcePtr
virStoragePoolDefParseSourceString(const char *srcSpec,
int pool_type)
@@ -703,6 +713,7 @@ virStoragePoolDefParseSourceString(const char *srcSpec,
return ret;
}
+
static int
virStorageDefParsePerms(xmlXPathContextPtr ctxt,
virStoragePermsPtr perms,
@@ -780,6 +791,7 @@ virStorageDefParsePerms(xmlXPathContextPtr ctxt,
return ret;
}
+
virStoragePoolDefPtr
virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
{
@@ -957,6 +969,7 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
goto cleanup;
}
+
virStoragePoolDefPtr
virStoragePoolDefParseNode(xmlDocPtr xml,
xmlNodePtr root)
@@ -985,6 +998,7 @@ virStoragePoolDefParseNode(xmlDocPtr xml,
return def;
}
+
static virStoragePoolDefPtr
virStoragePoolDefParse(const char *xmlStr,
const char *filename)
@@ -1000,18 +1014,21 @@ virStoragePoolDefParse(const char *xmlStr,
return ret;
}
+
virStoragePoolDefPtr
virStoragePoolDefParseString(const char *xmlStr)
{
return virStoragePoolDefParse(xmlStr, NULL);
}
+
virStoragePoolDefPtr
virStoragePoolDefParseFile(const char *filename)
{
return virStoragePoolDefParse(NULL, filename);
}
+
static int
virStoragePoolSourceFormat(virBufferPtr buf,
virStoragePoolOptionsPtr options,
@@ -1219,6 +1236,7 @@ virStoragePoolDefFormatBuf(virBufferPtr buf,
return 0;
}
+
char *
virStoragePoolDefFormat(virStoragePoolDefPtr def)
{
@@ -1256,6 +1274,7 @@ virStorageSize(const char *unit,
return 0;
}
+
static virStorageVolDefPtr
virStorageVolDefParseXML(virStoragePoolDefPtr pool,
xmlXPathContextPtr ctxt,
@@ -1431,6 +1450,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
goto cleanup;
}
+
virStorageVolDefPtr
virStorageVolDefParseNode(virStoragePoolDefPtr pool,
xmlDocPtr xml,
@@ -1461,6 +1481,7 @@ virStorageVolDefParseNode(virStoragePoolDefPtr pool,
return def;
}
+
static virStorageVolDefPtr
virStorageVolDefParse(virStoragePoolDefPtr pool,
const char *xmlStr,
@@ -1478,6 +1499,7 @@ virStorageVolDefParse(virStoragePoolDefPtr pool,
return ret;
}
+
virStorageVolDefPtr
virStorageVolDefParseString(virStoragePoolDefPtr pool,
const char *xmlStr,
@@ -1486,6 +1508,7 @@ virStorageVolDefParseString(virStoragePoolDefPtr pool,
return virStorageVolDefParse(pool, xmlStr, NULL, flags);
}
+
virStorageVolDefPtr
virStorageVolDefParseFile(virStoragePoolDefPtr pool,
const char *filename,
@@ -1494,6 +1517,7 @@ virStorageVolDefParseFile(virStoragePoolDefPtr pool,
return virStorageVolDefParse(pool, NULL, filename, flags);
}
+
static void
virStorageVolTimestampFormat(virBufferPtr buf, const char *name,
struct timespec *ts)
@@ -1507,6 +1531,7 @@ virStorageVolTimestampFormat(virBufferPtr buf, const char *name,
virBufferAsprintf(buf, "</%s>\n", name);
}
+
static int
virStorageVolTargetDefFormat(virStorageVolOptionsPtr options,
virBufferPtr buf,
@@ -1598,6 +1623,7 @@ virStorageVolTargetDefFormat(virStorageVolOptionsPtr options,
return 0;
}
+
char *
virStorageVolDefFormat(virStoragePoolDefPtr pool,
virStorageVolDefPtr def)
@@ -1680,9 +1706,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;
@@ -1767,6 +1794,7 @@ virStoragePoolSourceListNewSource(virStoragePoolSourceListPtr list)
return source;
}
+
char *
virStoragePoolSourceListFormat(virStoragePoolSourceListPtr def)
{
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 5c0f827..12108d8 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)
{
@@ -637,6 +648,7 @@ matchFCHostToSCSIHost(virConnectPtr conn,
return ret;
}
+
static bool
matchSCSIAdapterParent(virStoragePoolObjPtr pool,
virStoragePoolDefPtr def)
@@ -659,6 +671,7 @@ matchSCSIAdapterParent(virStoragePoolObjPtr pool,
return false;
}
+
static bool
virStoragePoolSourceMatchSingleHost(virStoragePoolSourcePtr poolsrc,
virStoragePoolSourcePtr defsrc)
@@ -840,18 +853,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,
@@ -912,6 +928,7 @@ virStoragePoolMatch(virStoragePoolObjPtr poolobj,
}
#undef MATCH
+
int
virStoragePoolObjListExport(virConnectPtr conn,
virStoragePoolObjList poolobjs,
--
2.9.3