From 797720876a5c24dd6adb3c2d6e0c872ac3b35c11 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sun, 4 May 2014 12:23:59 +0400 Subject: qmp: report path ambiguity error Without this, ambiguous path is reported to the user as "not found", which is confusing at least. Signed-off-by: Michael Tokarev --- qmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qmp.c') 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; } -- cgit v1.2.3