diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-11-12 08:16:22 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:19 -0500 |
commit | ed7fa564cb104070213eb6184573a0074827bdb8 (patch) | |
tree | 67b36baeaa6c0bd66f6fd7481b06c5fa2eb51203 /util | |
parent | 4b7acd2ac82159fe193c0babf95aa9962d68a700 (diff) |
config-file: move -set implementation to vl.c
We want to make it independent of QemuOpts.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/qemu-config.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/util/qemu-config.c b/util/qemu-config.c index 660f47b005..725e3d7e4b 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; |