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

[libvirt] [PATCH 1/3] maint: clean up _virDomainInterfaceStats



I clean up all _virDomainInterfaceStats.

Signed-off-by: James <james wangyufei huawei com>
Signed-off-by: Wang Rui <moon wangrui huawei com>
---
 src/driver.h                 | 2 +-
 src/libvirt.c                | 4 ++--
 src/lxc/lxc_driver.c         | 4 ++--
 src/openvz/openvz_driver.c   | 2 +-
 src/qemu/qemu_driver.c       | 2 +-
 src/test/test_driver.c       | 2 +-
 src/util/virstats.c          | 6 +++---
 src/util/virstats.h          | 2 +-
 src/xen/xen_driver.c         | 2 +-
 src/xen/xen_hypervisor.c     | 2 +-
 src/xen/xen_hypervisor.h     | 2 +-
 tools/virsh-domain-monitor.c | 2 +-
 12 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/driver.h b/src/driver.h
index a7366e4..b02e1c0 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -517,7 +517,7 @@ typedef int
 typedef int
 (*virDrvDomainInterfaceStats)(virDomainPtr domain,
                               const char *path,
-                              struct _virDomainInterfaceStats *stats);
+                              virDomainInterfaceStatsPtr stats);
 
 typedef int
 (*virDrvDomainSetInterfaceParameters)(virDomainPtr dom,
diff --git a/src/libvirt.c b/src/libvirt.c
index f7e5a37..83403b7 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -8047,8 +8047,8 @@ virDomainInterfaceStats(virDomainPtr dom, const char *path,
                         virDomainInterfaceStatsPtr stats, size_t size)
 {
     virConnectPtr conn;
-    struct _virDomainInterfaceStats stats2 = { -1, -1, -1, -1,
-                                               -1, -1, -1, -1 };
+    virDomainInterfaceStatsStruct stats2 = { -1, -1, -1, -1,
+                                             -1, -1, -1, -1 };
 
     VIR_DOMAIN_DEBUG(dom, "path=%s, stats=%p, size=%zi",
                      path, stats, size);
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index e5b6662..3218583 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3084,7 +3084,7 @@ lxcDomainGetBlkioParameters(virDomainPtr dom,
 static int
 lxcDomainInterfaceStats(virDomainPtr dom,
                         const char *path,
-                        struct _virDomainInterfaceStats *stats)
+                        virDomainInterfaceStatsPtr stats)
 {
     virDomainObjPtr vm;
     size_t i;
@@ -3126,7 +3126,7 @@ lxcDomainInterfaceStats(virDomainPtr dom,
 static int
 lxcDomainInterfaceStats(virDomainPtr dom,
                         const char *path ATTRIBUTE_UNUSED,
-                        struct _virDomainInterfaceStats *stats ATTRIBUTE_UNUSED)
+                        virDomainInterfaceStatsPtr stats ATTRIBUTE_UNUSED)
 {
     virReportUnsupportedError();
     return -1;
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 6c73eaf..b62273a 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1975,7 +1975,7 @@ openvzGetVEStatus(virDomainObjPtr vm, int *status, int *reason)
 static int
 openvzDomainInterfaceStats(virDomainPtr dom,
                            const char *path,
-                           struct _virDomainInterfaceStats *stats)
+                           virDomainInterfaceStatsPtr stats)
 {
     struct openvz_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6008aeb..406f295 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9841,7 +9841,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom,
 static int
 qemuDomainInterfaceStats(virDomainPtr dom,
                          const char *path,
-                         struct _virDomainInterfaceStats *stats)
+                         virDomainInterfaceStatsPtr stats)
 {
     virDomainObjPtr vm;
     size_t i;
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 9918d2c..8ae4c44 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3422,7 +3422,7 @@ static int testDomainBlockStats(virDomainPtr domain,
 
 static int testDomainInterfaceStats(virDomainPtr domain,
                                     const char *path,
-                                    struct _virDomainInterfaceStats *stats)
+                                    virDomainInterfaceStatsPtr stats)
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
diff --git a/src/util/virstats.c b/src/util/virstats.c
index b10fd85..c4725ed 100644
--- a/src/util/virstats.c
+++ b/src/util/virstats.c
@@ -51,7 +51,7 @@
 #ifdef __linux__
 int
 virNetInterfaceStats(const char *path,
-                     struct _virDomainInterfaceStats *stats)
+                     virDomainInterfaceStatsPtr stats)
 {
     int path_len;
     FILE *fp;
@@ -122,7 +122,7 @@ virNetInterfaceStats(const char *path,
 #elif defined(HAVE_GETIFADDRS) && defined(AF_LINK)
 int
 virNetInterfaceStats(const char *path,
-                     struct _virDomainInterfaceStats *stats)
+                     virDomainInterfaceStatsPtr stats)
 {
     struct ifaddrs *ifap, *ifa;
     struct if_data *ifd;
@@ -168,7 +168,7 @@ virNetInterfaceStats(const char *path,
 #else
 int
 virNetInterfaceStats(const char *path ATTRIBUTE_UNUSED,
-                     struct _virDomainInterfaceStats *stats ATTRIBUTE_UNUSED)
+                     virDomainInterfaceStatsPtr stats ATTRIBUTE_UNUSED)
 {
     virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                    _("interface stats not implemented on this platform"));
diff --git a/src/util/virstats.h b/src/util/virstats.h
index 9724d8e..d2c6b64 100644
--- a/src/util/virstats.h
+++ b/src/util/virstats.h
@@ -26,6 +26,6 @@
 # include "internal.h"
 
 extern int virNetInterfaceStats(const char *path,
-                                struct _virDomainInterfaceStats *stats);
+                                virDomainInterfaceStatsPtr stats);
 
 #endif /* __STATS_LINUX_H__ */
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 0fc3aca..04eb6e2 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2242,7 +2242,7 @@ xenUnifiedDomainBlockStats(virDomainPtr dom, const char *path,
 
 static int
 xenUnifiedDomainInterfaceStats(virDomainPtr dom, const char *path,
-                               struct _virDomainInterfaceStats *stats)
+                               virDomainInterfaceStatsPtr stats)
 {
     virDomainDefPtr def = NULL;
     int ret = -1;
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 8570653..27f19ed 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -1451,7 +1451,7 @@ xenHypervisorDomainBlockStats(virConnectPtr conn,
 int
 xenHypervisorDomainInterfaceStats(virDomainDefPtr def,
                                   const char *path,
-                                  struct _virDomainInterfaceStats *stats)
+                                  virDomainInterfaceStatsPtr stats)
 {
 #ifdef __linux__
     int rqdomid, device;
diff --git a/src/xen/xen_hypervisor.h b/src/xen/xen_hypervisor.h
index 2990e51..5358d15 100644
--- a/src/xen/xen_hypervisor.h
+++ b/src/xen/xen_hypervisor.h
@@ -129,7 +129,7 @@ int     xenHypervisorDomainBlockStats   (virConnectPtr conn,
           ATTRIBUTE_NONNULL (1);
 int     xenHypervisorDomainInterfaceStats (virDomainDefPtr def,
                                            const char *path,
-                                           struct _virDomainInterfaceStats *stats)
+                                           virDomainInterfaceStatsPtr stats)
           ATTRIBUTE_NONNULL (1);
 
 int     xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn,
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 055d8d2..e828ea9 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1047,7 +1047,7 @@ cmdDomIfstat(vshControl *ctl, const vshCmd *cmd)
 {
     virDomainPtr dom;
     const char *name = NULL, *device = NULL;
-    struct _virDomainInterfaceStats stats;
+    virDomainInterfaceStatsStruct stats;
     bool ret = false;
 
     if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
-- 
1.7.12.4



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