-set as far as I can see has basically no use. It was intended as an override mechanism for configuration files, but even configuration files themselves are hardly used. Drop it with prejudice.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- docs/system/deprecated.rst | 6 ++++++ include/qemu/config-file.h | 1 - qemu-options.hx | 9 --------- softmmu/vl.c | 4 ---- util/qemu-config.c | 33 --------------------------------- 5 files changed, 6 insertions(+), 47 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 9aa1ab268b..f7eede1b68 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -719,6 +719,12 @@ topologies described with -smp include all possible cpus, i.e. The ``enforce-config-section`` property was replaced by the ``-global migration.send-configuration={on|off}`` option. +``-set`` (removed 6.0) +'''''''''''''''''''''' + +The ``-set`` option was removed with no replacement and no prior +deprecation period. + Block devices ------------- diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h index d74f920152..29226107bd 100644 --- a/include/qemu/config-file.h +++ b/include/qemu/config-file.h @@ -8,7 +8,6 @@ QemuOpts *qemu_find_opts_singleton(const char *group); void qemu_add_opts(QemuOptsList *list); void qemu_add_drive_opts(QemuOptsList *list); -int qemu_set_option(const char *str); int qemu_global_option(const char *str); void qemu_config_write(FILE *fp); diff --git a/qemu-options.hx b/qemu-options.hx index 2c83390504..45c503cb8f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -371,15 +371,6 @@ SRST -drive file=/dev/fdset/2,index=0,media=disk ERST -DEF("set", HAS_ARG, QEMU_OPTION_set, - "-set group.id.arg=value\n" - " set <arg> parameter for item <id> of type <group>\n" - " i.e. -set drive.$id.file=/path/to/image\n", QEMU_ARCH_ALL) -SRST -``-set group.id.arg=value`` - Set parameter arg for item id of type group -ERST - DEF("global", HAS_ARG, QEMU_OPTION_global, "-global driver.property=value\n" "-global driver=driver,property=property,value=value\n" diff --git a/softmmu/vl.c b/softmmu/vl.c index 50c4850064..f66a4eb9c2 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2652,10 +2652,6 @@ void qemu_init(int argc, char **argv, char **envp) exit(1); } break; - case QEMU_OPTION_set: - if (qemu_set_option(optarg) != 0) - exit(1); - break; case QEMU_OPTION_global: if (qemu_global_option(optarg) != 0) exit(1); diff --git a/util/qemu-config.c b/util/qemu-config.c index bcae298b71..1a7b7e951c 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -313,39 +313,6 @@ void qemu_add_opts(QemuOptsList *list) abort(); } -int qemu_set_option(const char *str) -{ - Error *local_err = NULL; - char group[64], id[64], arg[64]; - QemuOptsList *list; - QemuOpts *opts; - int rc, offset; - - rc = sscanf(str, "%63[^.].%63[^.].%63[^=]%n", group, id, arg, &offset); - if (rc < 3 || str[offset] != '=') { - error_report("can't parse: \"%s\"", str); - return -1; - } - - list = qemu_find_opts(group); - if (list == NULL) { - return -1; - } - - opts = qemu_opts_find(list, id); - if (!opts) { - error_report("there is no %s \"%s\" defined", - list->name, id); - return -1; - } - - if (!qemu_opt_set(opts, arg, str + offset + 1, &local_err)) { - error_report_err(local_err); - return -1; - } - return 0; -} - struct ConfigWriteData { QemuOptsList *list; FILE *fp; -- 2.26.2