Skip to content

Commit

Permalink
hmp: Improve sync-profile error message
Browse files Browse the repository at this point in the history
Improve

    (qemu) sync-profile of
    Error: Invalid parameter 'of'

to

    Error: invalid parameter 'of', expecting 'on', 'off', or 'reset'

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-3-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
  • Loading branch information
Markus Armbruster committed Nov 17, 2023
1 parent db8227a commit 7200fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monitor/hmp-cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 7200fb2

Please sign in to comment.