qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	anthony@codemonkey.ws
Subject: [Qemu-devel] [PATCH 4/7] qdev: Use object_property_print() in info qtree
Date: Sun, 13 May 2012 20:27:42 +0200	[thread overview]
Message-ID: <1336933665-3867-5-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1336933665-3867-1-git-send-email-afaerber@suse.de>

From: Paolo Bonzini <pbonzini@redhat.com>

Otherwise, non-string properties without a legacy counterpart are missed.
Also fix error propagation in object_property_print() itself.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/qdev-monitor.c |    2 +-
 qom/object.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index dc4e4e1..a06748c 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -493,7 +493,7 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
         if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) {
             value = object_property_get_str(OBJECT(dev), legacy_name, &err);
         } else {
-            value = object_property_get_str(OBJECT(dev), props->name, &err);
+            value = object_property_print(OBJECT(dev), props->name, &err);
         }
         g_free(legacy_name);
 
diff --git a/qom/object.c b/qom/object.c
index e721fc2..6f839ad 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -830,7 +830,7 @@ char *object_property_print(Object *obj, const char *name,
     char *string;
 
     mo = string_output_visitor_new();
-    object_property_get(obj, string_output_get_visitor(mo), name, NULL);
+    object_property_get(obj, string_output_get_visitor(mo), name, errp);
     string = string_output_get_string(mo);
     string_output_visitor_cleanup(mo);
     return string;
-- 
1.7.7

  parent reply	other threads:[~2012-05-13 18:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-13 18:27 [Qemu-devel] [PULL for-1.1-rc2] Fixes from QOM-related series Andreas Färber
2012-05-13 18:27 ` [Qemu-devel] [PATCH 1/7] target-mips: Remove commented-out function declaration Andreas Färber
2012-05-13 18:27 ` [Qemu-devel] [PATCH 2/7] qom: Documentation addition for object_class_by_name() Andreas Färber
2012-05-13 18:27 ` [Qemu-devel] [PATCH 3/7] target-i386: Defer MCE init Andreas Färber
2012-05-13 18:27 ` Andreas Färber [this message]
2012-05-13 18:27 ` [Qemu-devel] [PATCH 5/7] qdev: Fix adding of ptr properties Andreas Färber
2012-05-13 18:27 ` [Qemu-devel] [PATCH 6/7] pc: Add back PCI.rombar compat property Andreas Färber
2012-05-13 18:27 ` [Qemu-devel] [PATCH 7/7] mips_fulong2e: Don't register "cpu" VMState twice Andreas Färber
2012-05-14 12:56 ` [Qemu-devel] [PULL for-1.1-rc2] Fixes from QOM-related series Luiz Capitulino
2012-05-14 20:08 ` Anthony Liguori

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=1336933665-3867-5-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).