1 #ifndef QEMU_CONFIG_FILE_H 2 #define QEMU_CONFIG_FILE_H 3 4 typedef void QEMUConfigCB(const char *group, QDict *qdict, void *opaque, Error **errp); 5 6 void qemu_load_module_for_opts(const char *group); 7 QemuOptsList *qemu_find_opts(const char *group); 8 QemuOptsList *qemu_find_opts_err(const char *group, Error **errp); 9 QemuOpts *qemu_find_opts_singleton(const char *group); 10 11 extern QemuOptsList *vm_config_groups[]; 12 extern QemuOptsList *drive_config_groups[]; 13 14 void qemu_add_opts(QemuOptsList *list); 15 void qemu_add_drive_opts(QemuOptsList *list); 16 int qemu_global_option(const char *str); 17 18 int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname, 19 Error **errp); 20 21 /* A default callback for qemu_read_config_file(). */ 22 void qemu_config_do_parse(const char *group, QDict *qdict, void *opaque, Error **errp); 23 24 int qemu_read_config_file(const char *filename, QEMUConfigCB *f, Error **errp); 25 26 /* Parse QDict options as a replacement for a config file (allowing multiple 27 enumerated (0..(n-1)) configuration "sections") */ 28 bool qemu_config_parse_qdict(QDict *options, QemuOptsList **lists, 29 Error **errp); 30 31 #endif /* QEMU_CONFIG_FILE_H */ 32