mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
QemuOpts: Add qemu_opt_unset()
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
74fe54f2a1
commit
0dd6c52663
2 changed files with 15 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue