diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/qemu-option.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/util/qemu-option.c b/util/qemu-option.c index e0ef426daa..5d686c805f 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -593,6 +593,20 @@ static const QemuOptDesc *find_desc_by_name(const QemuOptDesc *desc, return NULL; } +int qemu_opt_unset(QemuOpts *opts, const char *name) +{ + QemuOpt *opt = qemu_opt_find(opts, name); + + assert(opts_accepts_any(opts)); + + if (opt == NULL) { + return -1; + } else { + qemu_opt_del(opt); + return 0; + } +} + static void opt_set(QemuOpts *opts, const char *name, const char *value, bool prepend, Error **errp) { |