Commit 79772087 authored by Michael Tokarev's avatar Michael Tokarev
Browse files

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: default avatarMichael Tokarev <mjt@tls.msk.ru>
parent a22f8f38
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -200,7 +200,11 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path, Error **errp)

    obj = object_resolve_path(path, &ambiguous);
    if (obj == NULL) {
        if (ambiguous) {
            error_setg(errp, "Path '%s' is ambiguous", path);
        } else {
            error_set(errp, QERR_DEVICE_NOT_FOUND, path);
        }
        return NULL;
    }