[PATCH 2/3] maint: clean up _virDomainBlockStats

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

 



I clean up all _virDomainBlockStats.

Signed-off-by: James <james.wangyufei@xxxxxxxxxx>
Signed-off-by: Wang Rui <moon.wangrui@xxxxxxxxxx>
---
 src/driver.h                 | 2 +-
 src/libvirt.c                | 2 +-
 src/lxc/lxc_driver.c         | 2 +-
 src/qemu/qemu_driver.c       | 2 +-
 src/test/test_driver.c       | 2 +-
 src/xen/block_stats.c        | 4 ++--
 src/xen/block_stats.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 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/driver.h b/src/driver.h
index b02e1c0..76142bd 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -505,7 +505,7 @@ typedef int
 typedef int
 (*virDrvDomainBlockStats)(virDomainPtr domain,
                           const char *path,
-                          struct _virDomainBlockStats *stats);
+                          virDomainBlockStatsPtr stats);
 
 typedef int
 (*virDrvDomainBlockStatsFlags)(virDomainPtr domain,
diff --git a/src/libvirt.c b/src/libvirt.c
index 83403b7..8ca8aed 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -7908,7 +7908,7 @@ virDomainBlockStats(virDomainPtr dom, const char *disk,
                     virDomainBlockStatsPtr stats, size_t size)
 {
     virConnectPtr conn;
-    struct _virDomainBlockStats stats2 = { -1, -1, -1, -1, -1 };
+    virDomainBlockStatsStruct stats2 = { -1, -1, -1, -1, -1 };
 
     VIR_DOMAIN_DEBUG(dom, "disk=%s, stats=%p, size=%zi", disk, stats, size);
 
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 3218583..8ab4cf2 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2301,7 +2301,7 @@ lxcDomainMergeBlkioDevice(virBlkioDevicePtr *dest_array,
 static int
 lxcDomainBlockStats(virDomainPtr dom,
                     const char *path,
-                    struct _virDomainBlockStats *stats)
+                    virDomainBlockStatsPtr stats)
 {
     int ret = -1, idx;
     virDomainObjPtr vm;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 406f295..9f5c977 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9595,7 +9595,7 @@ qemuDomainBlockResize(virDomainPtr dom,
 static int
 qemuDomainBlockStats(virDomainPtr dom,
                      const char *path,
-                     struct _virDomainBlockStats *stats)
+                     virDomainBlockStatsPtr stats)
 {
     virQEMUDriverPtr driver = dom->conn->privateData;
     int idx;
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 8ae4c44..9adf6f7 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3369,7 +3369,7 @@ testDomainSetSchedulerParameters(virDomainPtr domain,
 
 static int testDomainBlockStats(virDomainPtr domain,
                                 const char *path,
-                                struct _virDomainBlockStats *stats)
+                                virDomainBlockStatsPtr stats)
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c
index 27e1019..58e796d 100644
--- a/src/xen/block_stats.c
+++ b/src/xen/block_stats.c
@@ -152,7 +152,7 @@ check_bd_connected(xenUnifiedPrivatePtr priv, int device, int domid)
 
 static int
 read_bd_stats(xenUnifiedPrivatePtr priv,
-              int device, int domid, struct _virDomainBlockStats *stats)
+              int device, int domid, virDomainBlockStatsPtr stats)
 {
     stats->rd_req   = read_bd_stat(device, domid, "rd_req");
     stats->rd_bytes = read_bd_stat(device, domid, "rd_sect");
@@ -343,7 +343,7 @@ int
 xenLinuxDomainBlockStats(xenUnifiedPrivatePtr priv,
                          virDomainDefPtr def,
                          const char *path,
-                         struct _virDomainBlockStats *stats)
+                         virDomainBlockStatsPtr stats)
 {
     int device = xenLinuxDomainDeviceID(def->id, path);
 
diff --git a/src/xen/block_stats.h b/src/xen/block_stats.h
index 6633d97..6cc9959 100644
--- a/src/xen/block_stats.h
+++ b/src/xen/block_stats.h
@@ -29,7 +29,7 @@
 
 extern int xenLinuxDomainBlockStats (xenUnifiedPrivatePtr priv,
                                      virDomainDefPtr def, const char *path,
-                                     struct _virDomainBlockStats *stats);
+                                     virDomainBlockStatsPtr stats);
 
 extern int xenLinuxDomainDeviceID(int domid, const char *dev);
 
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 04eb6e2..11ae8f9 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2222,7 +2222,7 @@ xenUnifiedDomainSetSchedulerParameters(virDomainPtr dom,
 
 static int
 xenUnifiedDomainBlockStats(virDomainPtr dom, const char *path,
-                           struct _virDomainBlockStats *stats)
+                           virDomainBlockStatsPtr stats)
 {
     virDomainDefPtr def = NULL;
     int ret = -1;
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 27f19ed..d3d4aea 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -1423,7 +1423,7 @@ int
 xenHypervisorDomainBlockStats(virConnectPtr conn,
                               virDomainDefPtr def,
                               const char *path,
-                              struct _virDomainBlockStats *stats)
+                              virDomainBlockStatsPtr stats)
 {
 #ifdef __linux__
     xenUnifiedPrivatePtr priv = conn->privateData;
diff --git a/src/xen/xen_hypervisor.h b/src/xen/xen_hypervisor.h
index 5358d15..f59847f 100644
--- a/src/xen/xen_hypervisor.h
+++ b/src/xen/xen_hypervisor.h
@@ -125,7 +125,7 @@ int     xenHypervisorSetSchedulerParameters(virConnectPtr conn,
 int     xenHypervisorDomainBlockStats   (virConnectPtr conn,
                                          virDomainDefPtr def,
                                          const char *path,
-                                         struct _virDomainBlockStats *stats)
+                                         virDomainBlockStatsPtr stats)
           ATTRIBUTE_NONNULL (1);
 int     xenHypervisorDomainInterfaceStats (virDomainDefPtr def,
                                            const char *path,
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index e828ea9..b2e1fc8 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -899,7 +899,7 @@ cmdDomblkstat(vshControl *ctl, const vshCmd *cmd)
 {
     virDomainPtr dom;
     const char *name = NULL, *device = NULL;
-    struct _virDomainBlockStats stats;
+    virDomainBlockStatsStruct stats;
     virTypedParameterPtr params = NULL;
     virTypedParameterPtr par = NULL;
     char *value = NULL;
-- 
1.7.12.4


--
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]