diff --git a/qmp.c b/qmp.c index c4836dfb6ccca449b9fd8d79278c38f5d6c31461..233325dd7ebce44cb21dce356cbf9e05dd954235 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; }