From: Markus Armbruster Date: Tue, 31 Oct 2023 11:10:54 +0000 (+0100) Subject: hmp: Improve sync-profile error message X-Git-Tag: v8.2.0-rc1~12^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7200fb211ef306c36d5e9060263b2a4d2f6d4700;p=thirdparty%2Fqemu.git hmp: Improve sync-profile error message Improve (qemu) sync-profile of Error: Invalid parameter 'of' to Error: invalid parameter 'of', expecting 'on', 'off', or 'reset' Signed-off-by: Markus Armbruster Message-ID: <20231031111059.3407803-3-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert --- diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 6c559b48c8e..871898ac46b 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -24,7 +24,6 @@ #include "qapi/qapi-commands-control.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qdict.h" -#include "qapi/qmp/qerror.h" #include "qemu/cutils.h" #include "hw/intc/intc.h" #include "qemu/log.h" @@ -138,7 +137,8 @@ void hmp_sync_profile(Monitor *mon, const QDict *qdict) } else { Error *err = NULL; - error_setg(&err, QERR_INVALID_PARAMETER, op); + error_setg(&err, "invalid parameter '%s'," + " expecting 'on', 'off', or 'reset'", op); hmp_handle_error(mon, err); } }