qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] qmp: Report path ambiguity error.
@ 2014-04-28 22:46 Hani Benhabiles
  2014-05-03  8:38 ` Michael Tokarev
  2014-05-05  9:37 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
  0 siblings, 2 replies; 6+ messages in thread
From: Hani Benhabiles @ 2014-04-28 22:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, lcapitulino

Signed-off-by: Hani Benhabiles <hani@linux.com>
Suggested-by: Andreas Färber <afaerber@suse.de>
---
 qmp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/qmp.c b/qmp.c
index 74107be..0d49abf 100644
--- a/qmp.c
+++ b/qmp.c
@@ -199,7 +199,10 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path, Error **errp)
     ObjectProperty *prop;
 
     obj = object_resolve_path(path, &ambiguous);
-    if (obj == NULL) {
+    if (ambiguous) {
+        error_setg(errp, "Path '%s' is ambiguous", path);
+        return NULL;
+    } else if (obj == NULL) {
         error_set(errp, QERR_DEVICE_NOT_FOUND, path);
         return NULL;
     }
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-05  9:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 22:46 [Qemu-trivial] [PATCH] qmp: Report path ambiguity error Hani Benhabiles
2014-05-03  8:38 ` Michael Tokarev
2014-05-05  9:12   ` Michael Tokarev
2014-05-05  9:26     ` Andreas Färber
2014-05-05  9:31       ` Michael Tokarev
2014-05-05  9:37 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber

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).