mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-28 08:37:05 +00:00
qmp: Eliminate silly QERR_QMP_* macros
The QERR_ macros are leftovers from the days of "rich" error objects. QERR_QMP_BAD_INPUT_OBJECT, QERR_QMP_BAD_INPUT_OBJECT_MEMBER, QERR_QMP_EXTRA_MEMBER are used in just one place now, except for one use that has crept into qobject-input-visitor.c. Drop these macros, to make the (bad) error messages more visible. Backports commit 99fb0c53c038105bae68b02a3d9f1cbf7951ba10 from qemu
This commit is contained in:
parent
23f5b17a08
commit
d07bcef231
|
@ -112,15 +112,6 @@
|
|||
#define QERR_QGA_COMMAND_FAILED \
|
||||
"Guest agent command failed, error was '%s'"
|
||||
|
||||
#define QERR_QMP_BAD_INPUT_OBJECT \
|
||||
"Expected '%s' in QMP input"
|
||||
|
||||
#define QERR_QMP_BAD_INPUT_OBJECT_MEMBER \
|
||||
"QMP input object member '%s' expects '%s'"
|
||||
|
||||
#define QERR_QMP_EXTRA_MEMBER \
|
||||
"QMP input object member '%s' is unexpected"
|
||||
|
||||
#define QERR_SET_PASSWD_FAILED \
|
||||
"Could not set password"
|
||||
|
||||
|
|
|
@ -144,7 +144,8 @@ 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, QERR_QMP_EXTRA_MEMBER, key);
|
||||
error_setg(errp, "QMP input object member '%s' is unexpected",
|
||||
key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue