mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-04 01:21:54 +00:00
e960a7ee46
Like -set and -readconfig, it would not really be too hard to extend -writeconfig to parsing mechanisms other than QemuOpts. However, the uses of -writeconfig are substantially more limited, as it is generally easier to write the configuration by hand in the first place. In addition, -writeconfig does not even try to detect cases where it prints incorrect syntax (for example if values have a quote in them, since qemu_config_parse does not support any kind of escaping. Just remove it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414145721.326866-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
#ifndef QEMU_CONFIG_FILE_H
|
|
#define QEMU_CONFIG_FILE_H
|
|
|
|
typedef void QEMUConfigCB(const char *group, QDict *qdict, void *opaque, Error **errp);
|
|
|
|
void qemu_load_module_for_opts(const char *group);
|
|
QemuOptsList *qemu_find_opts(const char *group);
|
|
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp);
|
|
QemuOpts *qemu_find_opts_singleton(const char *group);
|
|
|
|
void qemu_add_opts(QemuOptsList *list);
|
|
void qemu_add_drive_opts(QemuOptsList *list);
|
|
int qemu_global_option(const char *str);
|
|
|
|
int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname,
|
|
Error **errp);
|
|
|
|
/* A default callback for qemu_read_config_file(). */
|
|
void qemu_config_do_parse(const char *group, QDict *qdict, void *opaque, Error **errp);
|
|
|
|
int qemu_read_config_file(const char *filename, QEMUConfigCB *f, Error **errp);
|
|
|
|
/* Parse QDict options as a replacement for a config file (allowing multiple
|
|
enumerated (0..(n-1)) configuration "sections") */
|
|
void qemu_config_parse_qdict(QDict *options, QemuOptsList **lists,
|
|
Error **errp);
|
|
|
|
#endif /* QEMU_CONFIG_FILE_H */
|