diff options
author | Kevin Wolf <kwolf@redhat.com> | 2015-01-21 17:15:44 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-06-12 16:58:06 +0200 |
commit | bd50530a9f40f6560a03caeaaddd451e2ce90ed8 (patch) | |
tree | be6ecbd04757b119babeaa7e94ea205de7730fe6 /include/qapi/qmp | |
parent | a68197ff5b11f5a58d48e485d16a36758aeca7f4 (diff) |
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/qmp')
-rw-r--r-- | include/qapi/qmp/qdict.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index d68f4eb4d5..d20db943fb 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); |