From: Gonglei <arei.gong...@huawei.com> Only report the first error to QMP monitor.
Signed-off-by: Gonglei <arei.gong...@huawei.com> --- ui/keymaps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/keymaps.c b/ui/keymaps.c index 49410ae..47471d1 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -24,6 +24,7 @@ #include "keymaps.h" #include "sysemu/sysemu.h" +#include "monitor/monitor.h" static int get_keysym(const name2keysym_t *table, const char *name) @@ -104,7 +105,8 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table, f = filename ? fopen(filename, "r") : NULL; g_free(filename); if (!f) { - fprintf(stderr, "Could not read keymap file: '%s'\n", language); + qerror_report(ERROR_CLASS_GENERIC_ERROR, + "Could not read keymap file: '%s'", language); return NULL; } -- 1.7.12.4