]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: block: Remove unused qemuBlockGetNodeData
authorPeter Krempa <pkrempa@redhat.com>
Wed, 20 Jul 2022 09:20:47 +0000 (11:20 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Aug 2022 13:14:43 +0000 (15:14 +0200)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h

index e3b0d5721fb11c92e63f5ab0288ae541a46c3aac..a4f26cf1e3615f23ca025f6f09ce35dbcc9d18f8 100644 (file)
@@ -52,46 +52,6 @@ qemuBlockNodeNameValidate(const char *nn)
 }
 
 
-static int
-qemuBlockNamedNodesArrayToHash(size_t pos G_GNUC_UNUSED,
-                               virJSONValue *item,
-                               void *opaque)
-{
-    GHashTable *table = opaque;
-    const char *name;
-
-    if (!(name = virJSONValueObjectGetString(item, "node-name")))
-        return 1;
-
-    if (virHashAddEntry(table, name, item) < 0)
-        return -1;
-
-    return 0;
-}
-
-
-/**
- * qemuBlockGetNodeData:
- * @data: JSON object returned from query-named-block-nodes
- *
- * Returns a hash table organized by the node name of the JSON value objects of
- * data for given qemu block nodes.
- *
- * Returns a filled GHashTable *on success NULL on error.
- */
-GHashTable *
-qemuBlockGetNodeData(virJSONValue *data)
-{
-    g_autoptr(GHashTable) nodedata = virHashNew(virJSONValueHashFree);
-
-    if (virJSONValueArrayForeachSteal(data,
-                                      qemuBlockNamedNodesArrayToHash, nodedata) < 0)
-        return NULL;
-
-    return g_steal_pointer(&nodedata);
-}
-
-
 /**
  * qemuBlockStorageSourceSupportsConcurrentAccess:
  * @src: disk storage source
index dbc9cb223191d36c58e67c74e7a437a9ab129cd2..3036c76284055466d53febc95d521cc95dba576a 100644 (file)
@@ -39,9 +39,6 @@ struct qemuBlockNodeNameBackingChainData {
     char *drvstorage;
 };
 
-GHashTable *
-qemuBlockGetNodeData(virJSONValue *data);
-
 bool
 qemuBlockStorageSourceSupportsConcurrentAccess(virStorageSource *src);