[REPOST PATCH 3/5] conf: Alter coding style of network conf function prototypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jferlan@xxxxxxxxxx>
---
 src/conf/network_conf.h  |  84 ++++++++++++-------
 src/conf/virnetworkobj.h | 212 ++++++++++++++++++++++++++++-------------------
 2 files changed, 182 insertions(+), 114 deletions(-)

diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index 6922942..e9a5baf 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -290,43 +290,71 @@ enum {
     VIR_NETWORK_OBJ_LIST_ADD_CHECK_LIVE = (1 << 1),
 };
 
-virNetworkDefPtr virNetworkDefCopy(virNetworkDefPtr def, unsigned int flags);
-virNetworkDefPtr virNetworkDefParseXML(xmlXPathContextPtr ctxt);
-virNetworkDefPtr virNetworkDefParseString(const char *xmlStr);
-virNetworkDefPtr virNetworkDefParseFile(const char *filename);
-virNetworkDefPtr virNetworkDefParseNode(xmlDocPtr xml,
-                                        xmlNodePtr root);
-char *virNetworkDefFormat(const virNetworkDef *def, unsigned int flags);
-int virNetworkDefFormatBuf(virBufferPtr buf,
-                           const virNetworkDef *def,
-                           unsigned int flags);
-
-const char * virNetworkDefForwardIf(const virNetworkDef *def, size_t n);
-
-virPortGroupDefPtr virPortGroupFindByName(virNetworkDefPtr net,
-                                          const char *portgroup);
+virNetworkDefPtr
+virNetworkDefCopy(virNetworkDefPtr def, unsigned int flags);
+
+virNetworkDefPtr
+virNetworkDefParseXML(xmlXPathContextPtr ctxt);
+
+virNetworkDefPtr
+virNetworkDefParseString(const char *xmlStr);
+
+virNetworkDefPtr
+virNetworkDefParseFile(const char *filename);
+
+virNetworkDefPtr
+virNetworkDefParseNode(xmlDocPtr xml,
+                       xmlNodePtr root);
+
+char *
+virNetworkDefFormat(const virNetworkDef *def,
+                    unsigned int flags);
+
+int
+virNetworkDefFormatBuf(virBufferPtr buf,
+                       const virNetworkDef *def,
+                       unsigned int flags);
+
+const char *
+virNetworkDefForwardIf(const virNetworkDef *def,
+                       size_t n);
+
+virPortGroupDefPtr
+virPortGroupFindByName(virNetworkDefPtr net,
+                       const char *portgroup);
 
 virNetworkIPDefPtr
 virNetworkDefGetIPByIndex(const virNetworkDef *def,
-                          int family, size_t n);
+                          int family,
+                          size_t n);
+
 virNetDevIPRoutePtr
 virNetworkDefGetRouteByIndex(const virNetworkDef *def,
-                             int family, size_t n);
-int virNetworkIPDefPrefix(const virNetworkIPDef *def);
-int virNetworkIPDefNetmask(const virNetworkIPDef *def,
-                           virSocketAddrPtr netmask);
+                             int family,
+                             size_t n);
+
+int
+virNetworkIPDefPrefix(const virNetworkIPDef *def);
 
-int virNetworkSaveXML(const char *configDir,
-                      virNetworkDefPtr def,
-                      const char *xml);
+int
+virNetworkIPDefNetmask(const virNetworkIPDef *def,
+                       virSocketAddrPtr netmask);
+
+int
+virNetworkSaveXML(const char *configDir,
+                  virNetworkDefPtr def,
+                  const char *xml);
 
-int virNetworkSaveConfig(const char *configDir,
-                         virNetworkDefPtr def);
+int
+virNetworkSaveConfig(const char *configDir,
+                     virNetworkDefPtr def);
 
-char *virNetworkConfigFile(const char *dir,
-                           const char *name);
+char *
+virNetworkConfigFile(const char *dir,
+                     const char *name);
 
-void virNetworkSetBridgeMacAddr(virNetworkDefPtr def);
+void
+virNetworkSetBridgeMacAddr(virNetworkDefPtr def);
 
 VIR_ENUM_DECL(virNetworkForward)
 
diff --git a/src/conf/virnetworkobj.h b/src/conf/virnetworkobj.h
index 1eb3151..431721b 100644
--- a/src/conf/virnetworkobj.h
+++ b/src/conf/virnetworkobj.h
@@ -47,8 +47,11 @@ struct _virNetworkObj {
     virMacMapPtr macmap;
 };
 
-virNetworkObjPtr virNetworkObjNew(void);
-void virNetworkObjEndAPI(virNetworkObjPtr *net);
+virNetworkObjPtr
+virNetworkObjNew(void);
+
+void
+virNetworkObjEndAPI(virNetworkObjPtr *net);
 
 typedef struct _virNetworkObjList virNetworkObjList;
 typedef virNetworkObjList *virNetworkObjListPtr;
@@ -59,67 +62,98 @@ virNetworkObjIsActive(const virNetworkObj *net)
     return net->active;
 }
 
-virNetworkObjListPtr virNetworkObjListNew(void);
-
-virNetworkObjPtr virNetworkObjFindByUUIDLocked(virNetworkObjListPtr nets,
-                                               const unsigned char *uuid);
-virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets,
-                                         const unsigned char *uuid);
-virNetworkObjPtr virNetworkObjFindByNameLocked(virNetworkObjListPtr nets,
-                                               const char *name);
-virNetworkObjPtr virNetworkObjFindByName(virNetworkObjListPtr nets,
-                                         const char *name);
-bool virNetworkObjTaint(virNetworkObjPtr obj,
-                        virNetworkTaintFlags taint);
-
-typedef bool (*virNetworkObjListFilter)(virConnectPtr conn,
-                                        virNetworkDefPtr def);
-
-virNetworkObjPtr virNetworkAssignDef(virNetworkObjListPtr nets,
-                                     virNetworkDefPtr def,
-                                     unsigned int flags);
-void virNetworkObjAssignDef(virNetworkObjPtr network,
-                            virNetworkDefPtr def,
-                            bool live);
-int virNetworkObjSetDefTransient(virNetworkObjPtr network, bool live);
-void virNetworkObjUnsetDefTransient(virNetworkObjPtr network);
-virNetworkDefPtr virNetworkObjGetPersistentDef(virNetworkObjPtr network);
-int virNetworkObjReplacePersistentDef(virNetworkObjPtr network,
-                                      virNetworkDefPtr def);
-int virNetworkConfigChangeSetup(virNetworkObjPtr dom, unsigned int flags);
-
-void virNetworkRemoveInactive(virNetworkObjListPtr nets,
-                              virNetworkObjPtr net);
-
-int virNetworkSaveStatus(const char *statusDir,
-                         virNetworkObjPtr net) ATTRIBUTE_RETURN_CHECK;
-
-virNetworkObjPtr virNetworkLoadConfig(virNetworkObjListPtr nets,
-                                      const char *configDir,
-                                      const char *autostartDir,
-                                      const char *file);
-
-virNetworkObjPtr virNetworkLoadState(virNetworkObjListPtr nets,
-                                     const char *stateDir,
-                                     const char *name);
-
-int virNetworkLoadAllConfigs(virNetworkObjListPtr nets,
-                             const char *configDir,
-                             const char *autostartDir);
-
-int virNetworkLoadAllState(virNetworkObjListPtr nets,
-                           const char *stateDir);
-
-int virNetworkDeleteConfig(const char *configDir,
-                           const char *autostartDir,
-                           virNetworkObjPtr net);
-
-char *virNetworkConfigFile(const char *dir,
-                           const char *name);
-
-int virNetworkBridgeInUse(virNetworkObjListPtr nets,
-                          const char *bridge,
-                          const char *skipname);
+virNetworkObjListPtr
+virNetworkObjListNew(void);
+
+virNetworkObjPtr
+virNetworkObjFindByUUIDLocked(virNetworkObjListPtr nets,
+                              const unsigned char *uuid);
+
+virNetworkObjPtr
+virNetworkObjFindByUUID(virNetworkObjListPtr nets,
+                        const unsigned char *uuid);
+
+virNetworkObjPtr
+virNetworkObjFindByNameLocked(virNetworkObjListPtr nets,
+                              const char *name);
+
+virNetworkObjPtr
+virNetworkObjFindByName(virNetworkObjListPtr nets,
+                        const char *name);
+
+bool
+virNetworkObjTaint(virNetworkObjPtr obj,
+                   virNetworkTaintFlags taint);
+
+typedef bool
+(*virNetworkObjListFilter)(virConnectPtr conn,
+                           virNetworkDefPtr def);
+
+virNetworkObjPtr
+virNetworkAssignDef(virNetworkObjListPtr nets,
+                    virNetworkDefPtr def,
+                    unsigned int flags);
+
+void
+virNetworkObjAssignDef(virNetworkObjPtr network,
+                       virNetworkDefPtr def,
+                       bool live);
+
+int
+virNetworkObjSetDefTransient(virNetworkObjPtr network,
+                             bool live);
+
+void
+virNetworkObjUnsetDefTransient(virNetworkObjPtr network);
+
+virNetworkDefPtr
+virNetworkObjGetPersistentDef(virNetworkObjPtr network);
+
+int
+virNetworkObjReplacePersistentDef(virNetworkObjPtr network,
+                                  virNetworkDefPtr def);
+
+int
+virNetworkConfigChangeSetup(virNetworkObjPtr dom,
+                            unsigned int flags);
+
+void
+virNetworkRemoveInactive(virNetworkObjListPtr nets,
+                         virNetworkObjPtr net);
+
+int
+virNetworkSaveStatus(const char *statusDir,
+                     virNetworkObjPtr net) ATTRIBUTE_RETURN_CHECK;
+
+virNetworkObjPtr
+virNetworkLoadConfig(virNetworkObjListPtr nets,
+                     const char *configDir,
+                     const char *autostartDir,
+                     const char *file);
+
+virNetworkObjPtr
+virNetworkLoadState(virNetworkObjListPtr nets,
+                    const char *stateDir,
+                    const char *name);
+
+int
+virNetworkLoadAllConfigs(virNetworkObjListPtr nets,
+                         const char *configDir,
+                         const char *autostartDir);
+
+int
+virNetworkLoadAllState(virNetworkObjListPtr nets,
+                       const char *stateDir);
+
+int
+virNetworkDeleteConfig(const char *configDir,
+                       const char *autostartDir,
+                       virNetworkObjPtr net);
+
+int
+virNetworkBridgeInUse(virNetworkObjListPtr nets,
+                      const char *bridge,
+                      const char *skipname);
 
 int
 virNetworkObjUpdate(virNetworkObjPtr obj,
@@ -129,32 +163,38 @@ virNetworkObjUpdate(virNetworkObjPtr obj,
                     const char *xml,
                     unsigned int flags);  /* virNetworkUpdateFlags */
 
-int virNetworkObjListExport(virConnectPtr conn,
-                            virNetworkObjListPtr netobjs,
-                            virNetworkPtr **nets,
-                            virNetworkObjListFilter filter,
-                            unsigned int flags);
-
-typedef int (*virNetworkObjListIterator)(virNetworkObjPtr net,
-                                         void *opaque);
-
-int virNetworkObjListForEach(virNetworkObjListPtr nets,
-                             virNetworkObjListIterator callback,
+int
+virNetworkObjListExport(virConnectPtr conn,
+                        virNetworkObjListPtr netobjs,
+                        virNetworkPtr **nets,
+                        virNetworkObjListFilter filter,
+                        unsigned int flags);
+
+typedef int
+(*virNetworkObjListIterator)(virNetworkObjPtr net,
                              void *opaque);
 
-int virNetworkObjListGetNames(virNetworkObjListPtr nets,
-                              bool active,
-                              char **names,
-                              int nnames,
-                              virNetworkObjListFilter filter,
-                              virConnectPtr conn);
+int
+virNetworkObjListForEach(virNetworkObjListPtr nets,
+                         virNetworkObjListIterator callback,
+                         void *opaque);
 
-int virNetworkObjListNumOfNetworks(virNetworkObjListPtr nets,
-                                   bool active,
-                                   virNetworkObjListFilter filter,
-                                   virConnectPtr conn);
+int
+virNetworkObjListGetNames(virNetworkObjListPtr nets,
+                          bool active,
+                          char **names,
+                          int nnames,
+                          virNetworkObjListFilter filter,
+                          virConnectPtr conn);
 
-void virNetworkObjListPrune(virNetworkObjListPtr nets,
-                            unsigned int flags);
+int
+virNetworkObjListNumOfNetworks(virNetworkObjListPtr nets,
+                               bool active,
+                               virNetworkObjListFilter filter,
+                               virConnectPtr conn);
+
+void
+virNetworkObjListPrune(virNetworkObjListPtr nets,
+                       unsigned int flags);
 
 #endif /* __VIRNETWORKOBJ_H__ */
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux