aboutsummaryrefslogtreecommitdiff
path: root/include/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-01-21 17:15:44 +0100
committerKevin Wolf <kwolf@redhat.com>2015-06-12 16:58:06 +0200
commitbd50530a9f40f6560a03caeaaddd451e2ce90ed8 (patch)
treebe6ecbd04757b119babeaa7e94ea205de7730fe6 /include/qapi
parenta68197ff5b11f5a58d48e485d16a36758aeca7f4 (diff)
downloadqemu-bd50530a9f40f6560a03caeaaddd451e2ce90ed8.zip
qemu-bd50530a9f40f6560a03caeaaddd451e2ce90ed8.tar.gz
qemu-bd50530a9f40f6560a03caeaaddd451e2ce90ed8.tar.bz2
qdict: Add qdict_array_entries()
This counts the entries in a flattened array in a QDict without actually splitting the QDict into a QList. bdrv_open_image() doesn't take a QList, but rather a QDict and a key prefix string, so this is more convenient for block drivers which have a dynamically sized list of child nodes (e.g. Quorum) and are to be converted to using bdrv_open_image() as the standard interface for opening child nodes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/qapi')
-rw-r--r--include/qapi/qmp/qdict.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index d68f4eb..d20db94 100644
--- a/include/qapi/qmp/qdict.h
+++ b/include/qapi/qmp/qdict.h
@@ -70,6 +70,7 @@ void qdict_flatten(QDict *qdict);
void qdict_extract_subqdict(QDict *src, QDict **dst, const char *start);
void qdict_array_split(QDict *src, QList **dst);
+int qdict_array_entries(QDict *src, const char *subqdict);
void qdict_join(QDict *dest, QDict *src, bool overwrite);