qapi: Improve a QObject input visitor error message

The QObject input visitor has three error message formats:

* Parameter '%s' is missing
* "Invalid parameter type for '%s', expected: %s"
* "QMP input object member '%s' is unexpected"

The '%s' are member names (or "null", but I'll fix that later).

The last error message calls the thing "QMP input object member"
instead of "parameter". Misleading when the visitor is used on
QObjects that don't come from QMP. Change it to "Parameter '%s' is
unexpected".

Backports commit 910f738b851a263396fc85b2052e47f884ffead3 from qemu
This commit is contained in:
Markus Armbruster 2018-03-02 11:29:00 -05:00 committed by Lioncash
parent d07bcef231
commit d7da652d4e
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -144,8 +144,7 @@ static void qobject_input_check_struct(Visitor *v, Error **errp)
if (g_hash_table_size(top_ht)) {
const char *key;
g_hash_table_find(top_ht, always_true, (gpointer)&key);
error_setg(errp, "QMP input object member '%s' is unexpected",
key);
error_setg(errp, "Parameter '%s' is unexpected", key);
}
}
}