[PATCH 54/80] qemu: monitor: Remove unused qemuMonitorBlockStatsUpdateCapacity

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_monitor.c      | 11 -------
 src/qemu/qemu_monitor.h      |  4 ---
 src/qemu/qemu_monitor_json.c | 59 ------------------------------------
 src/qemu/qemu_monitor_json.h |  3 --
 4 files changed, 77 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 5e71945831..f1a9524f28 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2022,17 +2022,6 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon,
 }


-/* Updates "stats" to fill virtual and physical size of the image */
-int
-qemuMonitorBlockStatsUpdateCapacity(qemuMonitor *mon,
-                                    GHashTable *stats)
-{
-    QEMU_CHECK_MONITOR(mon);
-
-    return qemuMonitorJSONBlockStatsUpdateCapacity(mon, stats);
-}
-
-
 int
 qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon,
                                             GHashTable *stats)
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 24a33b9b29..6e657576ae 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -681,10 +681,6 @@ int qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon,
                                     GHashTable **ret_stats)
     ATTRIBUTE_NONNULL(2);

-int qemuMonitorBlockStatsUpdateCapacity(qemuMonitor *mon,
-                                        GHashTable *stats)
-    ATTRIBUTE_NONNULL(2);
-
 int qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon,
                                                 GHashTable *stats)
     ATTRIBUTE_NONNULL(2);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 85a36ff68b..b4a33184bd 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -2497,65 +2497,6 @@ qemuMonitorJSONBlockStatsUpdateCapacityData(virJSONValue *image,
 }


-static int
-qemuMonitorJSONBlockStatsUpdateCapacityOne(virJSONValue *image,
-                                           const char *dev_name,
-                                           int depth,
-                                           GHashTable *stats)
-{
-    g_autofree char *entry_name = qemuDomainStorageAlias(dev_name, depth);
-    virJSONValue *backing;
-
-    if (qemuMonitorJSONBlockStatsUpdateCapacityData(image, entry_name,
-                                                    stats, NULL) < 0)
-        return -1;
-
-    if ((backing = virJSONValueObjectGetObject(image, "backing-image")) &&
-        qemuMonitorJSONBlockStatsUpdateCapacityOne(backing,
-                                                   dev_name,
-                                                   depth + 1,
-                                                   stats) < 0)
-        return -1;
-
-    return 0;
-}
-
-
-int
-qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitor *mon,
-                                        GHashTable *stats)
-{
-    size_t i;
-    g_autoptr(virJSONValue) devices = NULL;
-
-    if (!(devices = qemuMonitorJSONQueryBlock(mon)))
-        return -1;
-
-    for (i = 0; i < virJSONValueArraySize(devices); i++) {
-        virJSONValue *dev;
-        virJSONValue *inserted;
-        virJSONValue *image;
-        const char *dev_name;
-
-        if (!(dev = qemuMonitorJSONGetBlockDev(devices, i)))
-            return -1;
-
-        if (!(dev_name = qemuMonitorJSONGetBlockDevDevice(dev)))
-            return -1;
-
-        /* drive may be empty */
-        if (!(inserted = virJSONValueObjectGetObject(dev, "inserted")) ||
-            !(image = virJSONValueObjectGetObject(inserted, "image")))
-            continue;
-
-        if (qemuMonitorJSONBlockStatsUpdateCapacityOne(image, dev_name, 0, stats) < 0)
-            return -1;
-    }
-
-    return 0;
-}
-
-
 static int
 qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker(size_t pos G_GNUC_UNUSED,
                                                       virJSONValue *val,
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index c5716dfe3e..9314baa5ba 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -99,9 +99,6 @@ int
 qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon,
                                     GHashTable *hash);
 int
-qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitor *mon,
-                                        GHashTable *stats);
-int
 qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon,
                                                 GHashTable *stats);

-- 
2.36.1




[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