aboutsummaryrefslogtreecommitdiff
path: root/include/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-02-01 20:00:44 +0100
committerKevin Wolf <kwolf@redhat.com>2018-03-09 15:17:47 +0100
commitbcebf102ccc3c6db327f341adc379fdf0673ca6b (patch)
tree56c08493a098807202128cf4d8205c258fc02b9f /include/qapi
parent37974a97d4d29229255b39ddd16c31743e1880ed (diff)
qdict: Introduce qdict_rename_keys()
A few block drivers will need to rename .bdrv_create options for their QAPIfication, so let's have a helper function for that. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/qapi')
-rw-r--r--include/qapi/qmp/qdict.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index ff6f7842c3..7c6d844549 100644
--- a/include/qapi/qmp/qdict.h
+++ b/include/qapi/qmp/qdict.h
@@ -81,4 +81,10 @@ QObject *qdict_crumple(const QDict *src, Error **errp);
void qdict_join(QDict *dest, QDict *src, bool overwrite);
+typedef struct QDictRenames {
+ const char *from;
+ const char *to;
+} QDictRenames;
+bool qdict_rename_keys(QDict *qdict, const QDictRenames *renames, Error **errp);
+
#endif /* QDICT_H */