aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qmp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/qmp.c b/qmp.c
index c4836dfb6c..233325dd7e 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;
}