[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v3] qmp: report path ambiguity error
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PATCH v3] qmp: report path ambiguity error |
Date: |
Sun, 4 May 2014 12:23:59 +0400 |
Without this, ambiguous path is reported to the user as
"not found", which is confusing at least.
Signed-off-by: Michael Tokarev <address@hidden>
---
qmp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/qmp.c b/qmp.c
index 74107be..37bd7dc 100644
--- a/qmp.c
+++ b/qmp.c
@@ -200,7 +200,11 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path,
Error **errp)
obj = object_resolve_path(path, &ambiguous);
if (obj == NULL) {
- error_set(errp, QERR_DEVICE_NOT_FOUND, path);
+ if (ambiguous) {
+ error_setg(errp, "Path '%s' is ambiguous", path);
+ } else {
+ error_set(errp, QERR_DEVICE_NOT_FOUND, path);
+ }
return NULL;
}
--
1.7.10.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-trivial] [PATCH v3] qmp: report path ambiguity error,
Michael Tokarev <=