qmp: report path ambiguity error
PATCH v3 1/1 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 <[email protected]>
--- qmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
qmp.c +5 -1
@@ -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 ; }
Signature · 1 line
1.7.10.4