From 84017c5954f589fb28ed6fc619a2a41e5c7c0553 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 7 Mar 2017 15:44:41 -0500 Subject: [PATCH] conf: Alter coding style of storage conf function prototypes In an effort to be consistent with the source module, alter the function prototypes to follow the similar style of source with the "type" on one line followed by the function name and arguments on subsequent lines with with argument getting it's own line. Signed-off-by: John Ferlan --- src/conf/storage_conf.h | 66 +++++++++++++++++++++++--------- src/conf/virstorageobj.h | 81 ++++++++++++++++++++++++++-------------- 2 files changed, 100 insertions(+), 47 deletions(-) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 6cd6a5c176..8ac6796a61 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -239,12 +239,21 @@ struct _virStoragePoolSourceList { virStoragePoolSourcePtr sources; }; -virStoragePoolDefPtr virStoragePoolDefParseXML(xmlXPathContextPtr ctxt); -virStoragePoolDefPtr virStoragePoolDefParseString(const char *xml); -virStoragePoolDefPtr virStoragePoolDefParseFile(const char *filename); -virStoragePoolDefPtr virStoragePoolDefParseNode(xmlDocPtr xml, - xmlNodePtr root); -char *virStoragePoolDefFormat(virStoragePoolDefPtr def); +virStoragePoolDefPtr +virStoragePoolDefParseXML(xmlXPathContextPtr ctxt); + +virStoragePoolDefPtr +virStoragePoolDefParseString(const char *xml); + +virStoragePoolDefPtr +virStoragePoolDefParseFile(const char *filename); + +virStoragePoolDefPtr +virStoragePoolDefParseNode(xmlDocPtr xml, + xmlNodePtr root); + +char * +virStoragePoolDefFormat(virStoragePoolDefPtr def); typedef enum { /* do not require volume capacity at all */ @@ -252,38 +261,59 @@ typedef enum { /* do not require volume capacity if the volume has a backing store */ VIR_VOL_XML_PARSE_OPT_CAPACITY = 1 << 1, } virStorageVolDefParseFlags; + virStorageVolDefPtr virStorageVolDefParseString(virStoragePoolDefPtr pool, const char *xml, unsigned int flags); + virStorageVolDefPtr virStorageVolDefParseFile(virStoragePoolDefPtr pool, const char *filename, unsigned int flags); + virStorageVolDefPtr virStorageVolDefParseNode(virStoragePoolDefPtr pool, xmlDocPtr xml, xmlNodePtr root, unsigned int flags); -char *virStorageVolDefFormat(virStoragePoolDefPtr pool, - virStorageVolDefPtr def); -int virStoragePoolSaveState(const char *stateFile, - virStoragePoolDefPtr def); -int virStoragePoolSaveConfig(const char *configFile, - virStoragePoolDefPtr def); -void virStorageVolDefFree(virStorageVolDefPtr def); -void virStoragePoolSourceClear(virStoragePoolSourcePtr source); -void virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev); -void virStoragePoolSourceFree(virStoragePoolSourcePtr source); -void virStoragePoolDefFree(virStoragePoolDefPtr def); +char * +virStorageVolDefFormat(virStoragePoolDefPtr pool, + virStorageVolDefPtr def); + +int +virStoragePoolSaveState(const char *stateFile, + virStoragePoolDefPtr def); + +int +virStoragePoolSaveConfig(const char *configFile, + virStoragePoolDefPtr def); + +void +virStorageVolDefFree(virStorageVolDefPtr def); + +void +virStoragePoolSourceClear(virStoragePoolSourcePtr source); + +void +virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev); + +void +virStoragePoolSourceFree(virStoragePoolSourcePtr source); + +void +virStoragePoolDefFree(virStoragePoolDefPtr def); virStoragePoolSourcePtr virStoragePoolDefParseSourceString(const char *srcSpec, int pool_type); + virStoragePoolSourcePtr virStoragePoolSourceListNewSource(virStoragePoolSourceListPtr list); -char *virStoragePoolSourceListFormat(virStoragePoolSourceListPtr def); + +char * +virStoragePoolSourceListFormat(virStoragePoolSourceListPtr def); typedef enum { VIR_STORAGE_POOL_FS_AUTO = 0, diff --git a/src/conf/virstorageobj.h b/src/conf/virstorageobj.h index e00954e723..13cec72c41 100644 --- a/src/conf/virstorageobj.h +++ b/src/conf/virstorageobj.h @@ -66,8 +66,9 @@ struct _virStorageDriverState { virObjectEventStatePtr storageEventState; }; -typedef bool (*virStoragePoolObjListFilter)(virConnectPtr conn, - virStoragePoolDefPtr def); +typedef bool +(*virStoragePoolObjListFilter)(virConnectPtr conn, + virStoragePoolDefPtr def); static inline int virStoragePoolObjIsActive(virStoragePoolObjPtr pool) @@ -75,23 +76,28 @@ virStoragePoolObjIsActive(virStoragePoolObjPtr pool) return pool->active; } -int virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools, - const char *configDir, - const char *autostartDir); +int +virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools, + const char *configDir, + const char *autostartDir); -int virStoragePoolLoadAllState(virStoragePoolObjListPtr pools, - const char *stateDir); +int +virStoragePoolLoadAllState(virStoragePoolObjListPtr pools, + const char *stateDir); virStoragePoolObjPtr virStoragePoolLoadState(virStoragePoolObjListPtr pools, const char *stateDir, const char *name); + virStoragePoolObjPtr virStoragePoolObjFindByUUID(virStoragePoolObjListPtr pools, const unsigned char *uuid); + virStoragePoolObjPtr virStoragePoolObjFindByName(virStoragePoolObjListPtr pools, const char *name); + virStoragePoolObjPtr virStoragePoolSourceFindDuplicateDevices(virStoragePoolObjPtr pool, virStoragePoolDefPtr def); @@ -99,44 +105,61 @@ virStoragePoolSourceFindDuplicateDevices(virStoragePoolObjPtr pool, virStorageVolDefPtr virStorageVolDefFindByKey(virStoragePoolObjPtr pool, const char *key); + virStorageVolDefPtr virStorageVolDefFindByPath(virStoragePoolObjPtr pool, const char *path); + virStorageVolDefPtr virStorageVolDefFindByName(virStoragePoolObjPtr pool, const char *name); -void virStoragePoolObjClearVols(virStoragePoolObjPtr pool); +void +virStoragePoolObjClearVols(virStoragePoolObjPtr pool); virStoragePoolObjPtr virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools, virStoragePoolDefPtr def); -int virStoragePoolObjSaveDef(virStorageDriverStatePtr driver, - virStoragePoolObjPtr pool, - virStoragePoolDefPtr def); -int virStoragePoolObjDeleteDef(virStoragePoolObjPtr pool); +int +virStoragePoolObjSaveDef(virStorageDriverStatePtr driver, + virStoragePoolObjPtr pool, + virStoragePoolDefPtr def); -void virStoragePoolObjFree(virStoragePoolObjPtr pool); -void virStoragePoolObjListFree(virStoragePoolObjListPtr pools); -void virStoragePoolObjRemove(virStoragePoolObjListPtr pools, - virStoragePoolObjPtr pool); +int +virStoragePoolObjDeleteDef(virStoragePoolObjPtr pool); -int virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools, - virStoragePoolDefPtr def, - unsigned int check_active); +void +virStoragePoolObjFree(virStoragePoolObjPtr pool); -int virStoragePoolSourceFindDuplicate(virConnectPtr conn, - virStoragePoolObjListPtr pools, - virStoragePoolDefPtr def); +void +virStoragePoolObjListFree(virStoragePoolObjListPtr pools); -void virStoragePoolObjLock(virStoragePoolObjPtr obj); -void virStoragePoolObjUnlock(virStoragePoolObjPtr obj); +void +virStoragePoolObjRemove(virStoragePoolObjListPtr pools, + virStoragePoolObjPtr pool); -int virStoragePoolObjListExport(virConnectPtr conn, - virStoragePoolObjList poolobjs, - virStoragePoolPtr **pools, - virStoragePoolObjListFilter filter, - unsigned int flags); +int +virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools, + virStoragePoolDefPtr def, + unsigned int check_active); + +int +virStoragePoolSourceFindDuplicate(virConnectPtr conn, + virStoragePoolObjListPtr pools, + virStoragePoolDefPtr def); + +void +virStoragePoolObjLock(virStoragePoolObjPtr obj); + +void +virStoragePoolObjUnlock(virStoragePoolObjPtr obj); + +int +virStoragePoolObjListExport(virConnectPtr conn, + virStoragePoolObjList poolobjs, + virStoragePoolPtr **pools, + virStoragePoolObjListFilter filter, + unsigned int flags); #endif /* __VIRSTORAGEOBJ_H__ */