mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
block: Add block-specific QDict header
There are numerous QDict functions that have been introduced for and are used only by the block layer. Move their declarations into an own header file to reflect that. While qdict_extract_subqdict() is in fact used outside of the block layer (in util/qemu-config.c), it is still a function related very closely to how the block layer works with nested QDicts, namely by sometimes flattening them. Therefore, its declaration is put into this header as well and util/qemu-config.c includes it with a comment stating exactly which function it needs. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20180509165530.29561-7-mreitz@redhat.com> [Copyright note tweaked, superfluous includes dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
deadbb8ebb
commit
609f45ea95
26 changed files with 56 additions and 17 deletions
|
@ -67,23 +67,6 @@ int64_t qdict_get_try_int(const QDict *qdict, const char *key,
|
|||
bool qdict_get_try_bool(const QDict *qdict, const char *key, bool def_value);
|
||||
const char *qdict_get_try_str(const QDict *qdict, const char *key);
|
||||
|
||||
void qdict_copy_default(QDict *dst, QDict *src, const char *key);
|
||||
void qdict_set_default_str(QDict *dst, const char *key, const char *val);
|
||||
|
||||
QDict *qdict_clone_shallow(const QDict *src);
|
||||
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);
|
||||
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue