diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-02-01 20:00:44 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-03-09 15:17:47 +0100 |
commit | bcebf102ccc3c6db327f341adc379fdf0673ca6b (patch) | |
tree | 56c08493a098807202128cf4d8205c258fc02b9f /include | |
parent | 37974a97d4d29229255b39ddd16c31743e1880ed (diff) | |
download | qemu-bcebf102ccc3c6db327f341adc379fdf0673ca6b.zip qemu-bcebf102ccc3c6db327f341adc379fdf0673ca6b.tar.gz qemu-bcebf102ccc3c6db327f341adc379fdf0673ca6b.tar.bz2 |
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')
-rw-r--r-- | include/qapi/qmp/qdict.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index ff6f784..7c6d844 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 */ |