提交 79772087 编写于 作者: M Michael Tokarev

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: NMichael Tokarev <mjt@tls.msk.ru>
上级 a22f8f38
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册