From bcebf102ccc3c6db327f341adc379fdf0673ca6b Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 1 Feb 2018 20:00:44 +0100 Subject: 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 Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- include/qapi/qmp/qdict.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/qapi') 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 */ -- cgit v1.1