From d7da652d4ece174a4243260870fa0049ef59d48d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 2 Mar 2018 11:29:00 -0500 Subject: [PATCH] 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 --- qemu/qapi/qobject-input-visitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu/qapi/qobject-input-visitor.c b/qemu/qapi/qobject-input-visitor.c index bcc1582f..876e5901 100644 --- a/qemu/qapi/qobject-input-visitor.c +++ b/qemu/qapi/qobject-input-visitor.c @@ -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); } } }