diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2014-05-04 12:23:59 +0400 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-05-07 21:00:43 +0400 |
commit | 797720876a5c24dd6adb3c2d6e0c872ac3b35c11 (patch) | |
tree | 10d8dee31f9b67c47d3955e2c8809e18215d724c /qmp.c | |
parent | a22f8f38942623dc473bf5ced5b4117b8bdf4821 (diff) |
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 <mjt@tls.msk.ru>
Diffstat (limited to 'qmp.c')
-rw-r--r-- | qmp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } |