diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-06 15:37:53 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-06 15:37:54 +0100 |
| commit | 572db7cd69bef46e94bd0bf6d7eacb1015ce714e (patch) | |
| tree | d46f3860a48e4f0054fe4e4ba02b59464499eae9 /qom/object_interfaces.c | |
| parent | e02bbe1956d8105f2593c3137da510eeb260010b (diff) | |
| parent | c645d5acee0ae022534cb609184277ec2b4a8577 (diff) | |
| download | focaccia-qemu-572db7cd69bef46e94bd0bf6d7eacb1015ce714e.tar.gz focaccia-qemu-572db7cd69bef46e94bd0bf6d7eacb1015ce714e.zip | |
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2017-06-06' into staging
Miscellaneous patches for 2017-06-06 # gpg: Signature made Tue 06 Jun 2017 08:30:43 BST # gpg: using RSA key 0x3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2017-06-06: monitor: fix object_del for command-line-created objects tests: check-qom-proplist: add checks for cmdline-created objects virtio-scsi-test: Use scsi-hd instead of legacy scsi-disk block: Clarify documentation of BlockInfo member io-status Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qom/object_interfaces.c')
| -rw-r--r-- | qom/object_interfaces.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index d4253a88de..ff27e0669e 100644 --- a/qom/object_interfaces.c +++ b/qom/object_interfaces.c @@ -4,6 +4,7 @@ #include "qemu/module.h" #include "qapi-visit.h" #include "qapi/opts-visitor.h" +#include "qemu/config-file.h" void user_creatable_complete(Object *obj, Error **errp) { @@ -181,6 +182,14 @@ void user_creatable_del(const char *id, Error **errp) error_setg(errp, "object '%s' is in use, can not be deleted", id); return; } + + /* + * if object was defined on the command-line, remove its corresponding + * option group entry + */ + qemu_opts_del(qemu_opts_find(qemu_find_opts_err("object", &error_abort), + id)); + object_unparent(obj); } |