Headers use same function parameter names as definition code.

In some cases in libvirt-domain and libvirt-network an established
naming pattern in the header files was more consistent and informative
in which case the implementation was modified in the c file.
---
 include/libvirt/libvirt-domain.h   | 18 +++++++-------
 include/libvirt/libvirt-event.h    |  4 ++--
 include/libvirt/libvirt-host.h     |  4 ++--
 include/libvirt/libvirt-network.h  |  4 ++--
 include/libvirt/libvirt-nwfilter.h |  2 +-
 include/libvirt/libvirt-qemu.h     |  2 +-
 include/libvirt/libvirt-secret.h   |  4 ++--
 include/libvirt/libvirt-storage.h  | 12 +++++-----
 include/libvirt/libvirt-stream.h   | 22 ++++++++---------
 src/libvirt-domain.c               | 48 +++++++++++++++++++-------------------
 src/libvirt-network.c              | 10 ++++----
 11 files changed, 65 insertions(+), 65 deletions(-)

diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 4048acf38..0f905bc24 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1109,7 +1109,7 @@ virDomainPtr            virDomainLookupByID     
(virConnectPtr conn,
 virDomainPtr            virDomainLookupByUUID   (virConnectPtr conn,
                                                  const unsigned char *uuid);
 virDomainPtr            virDomainLookupByUUIDString     (virConnectPtr conn,
-                                                         const char *uuid);
+                                                         const char *uuidstr);
 
 typedef enum {
     VIR_DOMAIN_SHUTDOWN_DEFAULT        = 0,        /* hypervisor choice */
@@ -1626,11 +1626,11 @@ int                     virDomainInterfaceStats 
(virDomainPtr dom,
  */
 # define VIR_DOMAIN_BANDWIDTH_OUT_BURST "outbound.burst"
 
-int                     virDomainSetInterfaceParameters (virDomainPtr dom,
+int                     virDomainSetInterfaceParameters (virDomainPtr domain,
                                                          const char *device,
                                                          virTypedParameterPtr 
params,
                                                          int nparams, unsigned 
int flags);
-int                     virDomainGetInterfaceParameters (virDomainPtr dom,
+int                     virDomainGetInterfaceParameters (virDomainPtr domain,
                                                          const char *device,
                                                          virTypedParameterPtr 
params,
                                                          int *nparams, 
unsigned int flags);
@@ -1697,7 +1697,7 @@ struct _virDomainBlockInfo {
                                     * offset, similar to 'ls')*/
 };
 
-int                     virDomainGetBlockInfo(virDomainPtr dom,
+int                     virDomainGetBlockInfo(virDomainPtr domain,
                                               const char *disk,
                                               virDomainBlockInfoPtr info,
                                               unsigned int flags);
@@ -1869,7 +1869,7 @@ int                     virDomainPinEmulator   
(virDomainPtr domain,
                                                 unsigned int flags);
 
 int                     virDomainGetEmulatorPinInfo (virDomainPtr domain,
-                                                     unsigned char *cpumaps,
+                                                     unsigned char *cpumap,
                                                      int maplen,
                                                      unsigned int flags);
 
@@ -2298,11 +2298,11 @@ void 
virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats);
  */
 # define VIR_PERF_PARAM_EMULATION_FAULTS  "emulation_faults"
 
-int virDomainGetPerfEvents(virDomainPtr dom,
+int virDomainGetPerfEvents(virDomainPtr domain,
                            virTypedParameterPtr *params,
                            int *nparams,
                            unsigned int flags);
-int virDomainSetPerfEvents(virDomainPtr dom,
+int virDomainSetPerfEvents(virDomainPtr domain,
                            virTypedParameterPtr params,
                            int nparams,
                            unsigned int flags);
@@ -3130,14 +3130,14 @@ typedef enum {
                                               * completed job */
 } virDomainGetJobStatsFlags;
 
-int virDomainGetJobInfo(virDomainPtr dom,
+int virDomainGetJobInfo(virDomainPtr domain,
                         virDomainJobInfoPtr info);
 int virDomainGetJobStats(virDomainPtr domain,
                          int *type,
                          virTypedParameterPtr *params,
                          int *nparams,
                          unsigned int flags);
-int virDomainAbortJob(virDomainPtr dom);
+int virDomainAbortJob(virDomainPtr domain);
 
 typedef enum {
     VIR_DOMAIN_JOB_OPERATION_UNKNOWN = 0,
diff --git a/include/libvirt/libvirt-event.h b/include/libvirt/libvirt-event.h
index 23227d090..0293a2841 100644
--- a/include/libvirt/libvirt-event.h
+++ b/include/libvirt/libvirt-event.h
@@ -179,11 +179,11 @@ int virEventAddHandle(int fd, int events,
 void virEventUpdateHandle(int watch, int events);
 int virEventRemoveHandle(int watch);
 
-int virEventAddTimeout(int frequency,
+int virEventAddTimeout(int timeout,
                        virEventTimeoutCallback cb,
                        void *opaque,
                        virFreeCallback ff);
-void virEventUpdateTimeout(int timer, int frequency);
+void virEventUpdateTimeout(int timer, int timeout);
 int virEventRemoveTimeout(int timer);
 
 
diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h
index 07b5d1594..bd8b7b551 100644
--- a/include/libvirt/libvirt-host.h
+++ b/include/libvirt/libvirt-host.h
@@ -665,8 +665,8 @@ char *virConnectBaselineCPU(virConnectPtr conn,
 int virNodeGetFreePages(virConnectPtr conn,
                         unsigned int npages,
                         unsigned int *pages,
-                        int startcell,
-                        unsigned int cellcount,
+                        int startCell,
+                        unsigned int cellCount,
                         unsigned long long *counts,
                         unsigned int flags);
 
diff --git a/include/libvirt/libvirt-network.h 
b/include/libvirt/libvirt-network.h
index 308f27f64..ef3602c0b 100644
--- a/include/libvirt/libvirt-network.h
+++ b/include/libvirt/libvirt-network.h
@@ -50,7 +50,7 @@ typedef virNetwork *virNetworkPtr;
 /*
  * Get connection from network.
  */
-virConnectPtr           virNetworkGetConnect    (virNetworkPtr network);
+virConnectPtr           virNetworkGetConnect    (virNetworkPtr net);
 
 /*
  * List active networks
@@ -96,7 +96,7 @@ virNetworkPtr           virNetworkLookupByName          
(virConnectPtr conn,
 virNetworkPtr           virNetworkLookupByUUID          (virConnectPtr conn,
                                                          const unsigned char 
*uuid);
 virNetworkPtr           virNetworkLookupByUUIDString    (virConnectPtr conn,
-                                                         const char *uuid);
+                                                         const char *uuidstr);
 
 /*
  * Create active transient network
diff --git a/include/libvirt/libvirt-nwfilter.h 
b/include/libvirt/libvirt-nwfilter.h
index 9f01c175a..c72a676ce 100644
--- a/include/libvirt/libvirt-nwfilter.h
+++ b/include/libvirt/libvirt-nwfilter.h
@@ -62,7 +62,7 @@ virNWFilterPtr          virNWFilterLookupByName       
(virConnectPtr conn,
 virNWFilterPtr          virNWFilterLookupByUUID       (virConnectPtr conn,
                                                        const unsigned char 
*uuid);
 virNWFilterPtr          virNWFilterLookupByUUIDString (virConnectPtr conn,
-                                                       const char *uuid);
+                                                       const char *uuidstr);
 
 /*
  * Define persistent nwfilter
diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h
index 2bb8ee868..f7db72ef7 100644
--- a/include/libvirt/libvirt-qemu.h
+++ b/include/libvirt/libvirt-qemu.h
@@ -40,7 +40,7 @@ typedef enum {
 int virDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd,
                                 char **result, unsigned int flags);
 
-virDomainPtr virDomainQemuAttach(virConnectPtr domain,
+virDomainPtr virDomainQemuAttach(virConnectPtr conn,
                                  unsigned int pid_value,
                                  unsigned int flags);
 
diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h
index 5df0b8ff8..bce58d051 100644
--- a/include/libvirt/libvirt-secret.h
+++ b/include/libvirt/libvirt-secret.h
@@ -84,7 +84,7 @@ int                     
virConnectListAllSecrets(virConnectPtr conn,
 virSecretPtr            virSecretLookupByUUID(virConnectPtr conn,
                                               const unsigned char *uuid);
 virSecretPtr            virSecretLookupByUUIDString(virConnectPtr conn,
-                                                    const char *uuid);
+                                                    const char *uuidstr);
 virSecretPtr            virSecretLookupByUsage(virConnectPtr conn,
                                                int usageType,
                                                const char *usageID);
@@ -92,7 +92,7 @@ virSecretPtr            virSecretDefineXML      
(virConnectPtr conn,
                                                  const char *xml,
                                                  unsigned int flags);
 int                     virSecretGetUUID        (virSecretPtr secret,
-                                                 unsigned char *buf);
+                                                 unsigned char *uuid);
 int                     virSecretGetUUIDString  (virSecretPtr secret,
                                                  char *buf);
 int                     virSecretGetUsageType   (virSecretPtr secret);
diff --git a/include/libvirt/libvirt-storage.h 
b/include/libvirt/libvirt-storage.h
index 413d9f6c4..f3209fb8b 100644
--- a/include/libvirt/libvirt-storage.h
+++ b/include/libvirt/libvirt-storage.h
@@ -262,7 +262,7 @@ virStoragePoolPtr       virStoragePoolLookupByName      
(virConnectPtr conn,
 virStoragePoolPtr       virStoragePoolLookupByUUID      (virConnectPtr conn,
                                                          const unsigned char 
*uuid);
 virStoragePoolPtr       virStoragePoolLookupByUUIDString(virConnectPtr conn,
-                                                         const char *uuid);
+                                                         const char *uuidstr);
 virStoragePoolPtr       virStoragePoolLookupByVolume    (virStorageVolPtr vol);
 virStoragePoolPtr       virStoragePoolLookupByTargetPath(virConnectPtr conn,
                                                          const char *path);
@@ -274,7 +274,7 @@ virStoragePoolPtr       virStoragePoolCreateXML         
(virConnectPtr conn,
                                                          const char *xmlDesc,
                                                          unsigned int flags);
 virStoragePoolPtr       virStoragePoolDefineXML         (virConnectPtr conn,
-                                                         const char *xmlDesc,
+                                                         const char *xml,
                                                          unsigned int flags);
 int                     virStoragePoolBuild             (virStoragePoolPtr 
pool,
                                                          unsigned int flags);
@@ -298,7 +298,7 @@ int                     virStoragePoolGetUUID           
(virStoragePoolPtr pool,
 int                     virStoragePoolGetUUIDString     (virStoragePoolPtr 
pool,
                                                          char *buf);
 
-int                     virStoragePoolGetInfo           (virStoragePoolPtr vol,
+int                     virStoragePoolGetInfo           (virStoragePoolPtr 
pool,
                                                          virStoragePoolInfoPtr 
info);
 
 char *                  virStoragePoolGetXMLDesc        (virStoragePoolPtr 
pool,
@@ -342,10 +342,10 @@ typedef enum {
 } virStorageVolCreateFlags;
 
 virStorageVolPtr        virStorageVolCreateXML          (virStoragePoolPtr 
pool,
-                                                         const char *xmldesc,
+                                                         const char *xmlDesc,
                                                          unsigned int flags);
 virStorageVolPtr        virStorageVolCreateXMLFrom      (virStoragePoolPtr 
pool,
-                                                         const char *xmldesc,
+                                                         const char *xmlDesc,
                                                          virStorageVolPtr 
clonevol,
                                                          unsigned int flags);
 
@@ -382,7 +382,7 @@ int                     virStorageVolGetInfo            
(virStorageVolPtr vol,
 int                     virStorageVolGetInfoFlags       (virStorageVolPtr vol,
                                                          virStorageVolInfoPtr 
info,
                                                          unsigned int flags);
-char *                  virStorageVolGetXMLDesc         (virStorageVolPtr pool,
+char *                  virStorageVolGetXMLDesc         (virStorageVolPtr vol,
                                                          unsigned int flags);
 
 char *                  virStorageVolGetPath            (virStorageVolPtr vol);
diff --git a/include/libvirt/libvirt-stream.h b/include/libvirt/libvirt-stream.h
index 86f96b158..c861c5658 100644
--- a/include/libvirt/libvirt-stream.h
+++ b/include/libvirt/libvirt-stream.h
@@ -35,13 +35,13 @@ typedef enum {
 
 virStreamPtr virStreamNew(virConnectPtr conn,
                           unsigned int flags);
-int virStreamRef(virStreamPtr st);
+int virStreamRef(virStreamPtr stream);
 
-int virStreamSend(virStreamPtr st,
+int virStreamSend(virStreamPtr stream,
                   const char *data,
                   size_t nbytes);
 
-int virStreamRecv(virStreamPtr st,
+int virStreamRecv(virStreamPtr stream,
                   char *data,
                   size_t nbytes);
 
@@ -49,12 +49,12 @@ typedef enum {
     VIR_STREAM_RECV_STOP_AT_HOLE = (1 << 0),
 } virStreamRecvFlagsValues;
 
-int virStreamRecvFlags(virStreamPtr st,
+int virStreamRecvFlags(virStreamPtr stream,
                        char *data,
                        size_t nbytes,
                        unsigned int flags);
 
-int virStreamSendHole(virStreamPtr st,
+int virStreamSendHole(virStreamPtr stream,
                       long long length,
                       unsigned int flags);
 
@@ -95,7 +95,7 @@ typedef int (*virStreamSourceFunc)(virStreamPtr st,
                                    size_t nbytes,
                                    void *opaque);
 
-int virStreamSendAll(virStreamPtr st,
+int virStreamSendAll(virStreamPtr stream,
                      virStreamSourceFunc handler,
                      void *opaque);
 
@@ -158,7 +158,7 @@ typedef int (*virStreamSourceSkipFunc)(virStreamPtr st,
                                        long long length,
                                        void *opaque);
 
-int virStreamSparseSendAll(virStreamPtr st,
+int virStreamSparseSendAll(virStreamPtr stream,
                            virStreamSourceFunc handler,
                            virStreamSourceHoleFunc holeHandler,
                            virStreamSourceSkipFunc skipHandler,
@@ -196,7 +196,7 @@ typedef int (*virStreamSinkFunc)(virStreamPtr st,
                                  size_t nbytes,
                                  void *opaque);
 
-int virStreamRecvAll(virStreamPtr st,
+int virStreamRecvAll(virStreamPtr stream,
                      virStreamSinkFunc handler,
                      void *opaque);
 
@@ -262,9 +262,9 @@ int virStreamEventUpdateCallback(virStreamPtr stream,
 int virStreamEventRemoveCallback(virStreamPtr stream);
 
 
-int virStreamFinish(virStreamPtr st);
-int virStreamAbort(virStreamPtr st);
+int virStreamFinish(virStreamPtr stream);
+int virStreamAbort(virStreamPtr stream);
 
-int virStreamFree(virStreamPtr st);
+int virStreamFree(virStreamPtr stream);
 
 #endif /* __VIR_LIBVIRT_STREAM_H__ */
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index eaec0979a..dd87ea918 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -109,7 +109,7 @@ virConnectNumOfDomains(virConnectPtr conn)
 
 /**
  * virDomainGetConnect:
- * @dom: pointer to a domain
+ * @domain: pointer to a domain
  *
  * Provides the connection pointer associated with a domain.  The
  * reference counter on the connection is not increased by this
@@ -118,15 +118,15 @@ virConnectNumOfDomains(virConnectPtr conn)
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr
-virDomainGetConnect(virDomainPtr dom)
+virDomainGetConnect(virDomainPtr domain)
 {
-    VIR_DOMAIN_DEBUG(dom);
+    VIR_DOMAIN_DEBUG(domain);
 
     virResetLastError();
 
-    virCheckDomainReturn(dom, NULL);
+    virCheckDomainReturn(domain, NULL);
 
-    return dom->conn;
+    return domain->conn;
 }
 
 
@@ -688,7 +688,7 @@ virDomainResume(virDomainPtr domain)
 
 /**
  * virDomainPMSuspendForDuration:
- * @dom: a domain object
+ * @domain: a domain object
  * @target: a value from virNodeSuspendTarget
  * @duration: duration in seconds to suspend, or 0 for indefinite
  * @flags: extra flags; not used yet, so callers should always pass 0
@@ -713,26 +713,26 @@ virDomainResume(virDomainPtr domain)
  *          -1 on failure.
  */
 int
-virDomainPMSuspendForDuration(virDomainPtr dom,
+virDomainPMSuspendForDuration(virDomainPtr domain,
                               unsigned int target,
                               unsigned long long duration,
                               unsigned int flags)
 {
     virConnectPtr conn;
 
-    VIR_DOMAIN_DEBUG(dom, "target=%u duration=%llu flags=0x%x",
+    VIR_DOMAIN_DEBUG(domain, "target=%u duration=%llu flags=0x%x",
                      target, duration, flags);
 
     virResetLastError();
 
-    virCheckDomainReturn(dom, -1);
-    conn = dom->conn;
+    virCheckDomainReturn(domain, -1);
+    conn = domain->conn;
 
     virCheckReadOnlyGoto(conn->flags, error);
 
     if (conn->driver->domainPMSuspendForDuration) {
         int ret;
-        ret = conn->driver->domainPMSuspendForDuration(dom, target,
+        ret = conn->driver->domainPMSuspendForDuration(domain, target,
                                                        duration, flags);
         if (ret < 0)
             goto error;
@@ -749,7 +749,7 @@ virDomainPMSuspendForDuration(virDomainPtr dom,
 
 /**
  * virDomainPMWakeup:
- * @dom: a domain object
+ * @domain: a domain object
  * @flags: extra flags; not used yet, so callers should always pass 0
  *
  * Inject a wakeup into the guest that previously used
@@ -760,23 +760,23 @@ virDomainPMSuspendForDuration(virDomainPtr dom,
  *          -1 on failure.
  */
 int
-virDomainPMWakeup(virDomainPtr dom,
+virDomainPMWakeup(virDomainPtr domain,
                   unsigned int flags)
 {
     virConnectPtr conn;
 
-    VIR_DOMAIN_DEBUG(dom, "flags=0x%x", flags);
+    VIR_DOMAIN_DEBUG(domain, "flags=0x%x", flags);
 
     virResetLastError();
 
-    virCheckDomainReturn(dom, -1);
-    conn = dom->conn;
+    virCheckDomainReturn(domain, -1);
+    conn = domain->conn;
 
     virCheckReadOnlyGoto(conn->flags, error);
 
     if (conn->driver->domainPMWakeup) {
         int ret;
-        ret = conn->driver->domainPMWakeup(dom, flags);
+        ret = conn->driver->domainPMWakeup(domain, flags);
         if (ret < 0)
             goto error;
         return ret;
@@ -7557,7 +7557,7 @@ virDomainGetMaxVcpus(virDomainPtr domain)
 
 /**
  * virDomainGetIOThreadInfo:
- * @dom: a domain object
+ * @domain: a domain object
  * @info: pointer to an array of virDomainIOThreadInfo structures (OUT)
  * @flags: bitwise-OR of virDomainModificationImpact
  *     Must not be VIR_DOMAIN_AFFECT_LIVE and
@@ -7572,15 +7572,15 @@ virDomainGetMaxVcpus(virDomainPtr domain)
  * then calling free() on @info. On error, @info is set to NULL.
  */
 int
-virDomainGetIOThreadInfo(virDomainPtr dom,
+virDomainGetIOThreadInfo(virDomainPtr domain,
                          virDomainIOThreadInfoPtr **info,
                          unsigned int flags)
 {
-    VIR_DOMAIN_DEBUG(dom, "info=%p flags=0x%x", info, flags);
+    VIR_DOMAIN_DEBUG(domain, "info=%p flags=0x%x", info, flags);
 
     virResetLastError();
 
-    virCheckDomainReturn(dom, -1);
+    virCheckDomainReturn(domain, -1);
     virCheckNonNullArgGoto(info, error);
     *info = NULL;
 
@@ -7588,9 +7588,9 @@ virDomainGetIOThreadInfo(virDomainPtr dom,
                              VIR_DOMAIN_AFFECT_CONFIG,
                              error);
 
-    if (dom->conn->driver->domainGetIOThreadInfo) {
+    if (domain->conn->driver->domainGetIOThreadInfo) {
         int ret;
-        ret = dom->conn->driver->domainGetIOThreadInfo(dom, info, flags);
+        ret = domain->conn->driver->domainGetIOThreadInfo(domain, info, flags);
         if (ret < 0)
             goto error;
         return ret;
@@ -7599,7 +7599,7 @@ virDomainGetIOThreadInfo(virDomainPtr dom,
     virReportUnsupportedError();
 
  error:
-    virDispatchError(dom->conn);
+    virDispatchError(domain->conn);
     return -1;
 }
 
diff --git a/src/libvirt-network.c b/src/libvirt-network.c
index da3354300..6699db61a 100644
--- a/src/libvirt-network.c
+++ b/src/libvirt-network.c
@@ -427,7 +427,7 @@ virNetworkCreateXML(virConnectPtr conn, const char *xmlDesc)
 /**
  * virNetworkDefineXML:
  * @conn: pointer to the hypervisor connection
- * @xml: the XML description for the network, preferably in UTF-8
+ * @xmlDesc: an XML description of the network, preferably in UTF-8
  *
  * Define an inactive persistent virtual network or modify an existing
  * persistent one from the XML description.
@@ -438,19 +438,19 @@ virNetworkCreateXML(virConnectPtr conn, const char 
*xmlDesc)
  * Returns NULL in case of error, a pointer to the network otherwise
  */
 virNetworkPtr
-virNetworkDefineXML(virConnectPtr conn, const char *xml)
+virNetworkDefineXML(virConnectPtr conn, const char *xmlDesc)
 {
-    VIR_DEBUG("conn=%p, xml=%s", conn, NULLSTR(xml));
+    VIR_DEBUG("conn=%p, xml=%s", conn, NULLSTR(xmlDesc));
 
     virResetLastError();
 
     virCheckConnectReturn(conn, NULL);
     virCheckReadOnlyGoto(conn->flags, error);
-    virCheckNonNullArgGoto(xml, error);
+    virCheckNonNullArgGoto(xmlDesc, error);
 
     if (conn->networkDriver && conn->networkDriver->networkDefineXML) {
         virNetworkPtr ret;
-        ret = conn->networkDriver->networkDefineXML(conn, xml);
+        ret = conn->networkDriver->networkDefineXML(conn, xmlDesc);
         if (!ret)
             goto error;
         return ret;
-- 
2.14.1

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

Reply via email to