object_add (hmp command) wasn't registering its object in the internal
list of options, hence, not showing when using `writeconfig' command.
Steps to reproduce:
(qemu) object_add memory-backend-ram,id=mem1,size=1G
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1
(qemu) writeconfig qemu.conf
When done before this patch, `writeconfig' would not output the mem1
object to the config file. After this patch the output is as follows:
[object "mem1"]
qom-type = "memory-backend-ram"
size = "1G"
Signed-off-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
---
hmp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hmp.c b/hmp.c
index 4f2b8a10d2..36ae478482 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1818,7 +1818,6 @@ void hmp_object_add(Monitor *mon, const QDict *qdict)
}
obj = user_creatable_add_opts(opts, &err);
- qemu_opts_del(opts);
if (err) {
hmp_handle_error(mon, &err);
--
2.11.0