All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Otubo <eduardo.otubo@profitbricks.com>
To: qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, armbru@redhat.com,
	Eduardo Otubo <eduardo.otubo@profitbricks.com>
Subject: [Qemu-devel] [PATCH 2/2] object_add not registering option
Date: Wed, 15 Feb 2017 11:14:27 +0100	[thread overview]
Message-ID: <20170215101427.23736-3-eduardo.otubo@profitbricks.com> (raw)
In-Reply-To: <20170215101427.23736-1-eduardo.otubo@profitbricks.com>

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

  parent reply	other threads:[~2017-02-15 10:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 10:14 [Qemu-devel] [PATCH 0/2] add writeconfig command on monitor Eduardo Otubo
2017-02-15 10:14 ` [Qemu-devel] [PATCH 1/2] qmp/hmp: add writeconfig Eduardo Otubo
2017-02-16 16:12   ` Eric Blake
2017-02-15 10:14 ` Eduardo Otubo [this message]
2017-02-16  9:23 ` [Qemu-devel] [PATCH 0/2] add writeconfig command on monitor Markus Armbruster
2017-02-16  9:53   ` Dr. David Alan Gilbert
2017-02-16 10:31     ` Eduardo Otubo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170215101427.23736-3-eduardo.otubo@profitbricks.com \
    --to=eduardo.otubo@profitbricks.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.