diff options
author | Markus Armbruster <armbru@redhat.com> | 2023-10-31 12:10:56 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-11-17 10:07:52 +0100 |
commit | 517b0220efd421acf885eed109571a61e95b192a (patch) | |
tree | 7a98ebbe0c3a14c39c572658b5637c6c17fa653b /ui/ui-qmp-cmds.c | |
parent | b665165938d89c8e1f83f970d3722f507ce87acd (diff) |
ui/qmp-cmds: Improve two error messages
set_password with "protocol": "vnc" supports only "connected": "keep".
Any other value is rejected with
Invalid parameter 'connected'
Improve this to
parameter 'connected' must be 'keep' when 'protocol' is 'vnc'
client_migrate_info requires "port" or "tls-port". When both are
missing, it fails with
Parameter 'port/tls-port' is missing
Improve this to
parameter 'port' or 'tls-port' is required
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-5-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'ui/ui-qmp-cmds.c')
-rw-r--r-- | ui/ui-qmp-cmds.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/ui-qmp-cmds.c b/ui/ui-qmp-cmds.c index d772e1cb7f..74fa6c6ec5 100644 --- a/ui/ui-qmp-cmds.c +++ b/ui/ui-qmp-cmds.c @@ -44,7 +44,8 @@ void qmp_set_password(SetPasswordOptions *opts, Error **errp) assert(opts->protocol == DISPLAY_PROTOCOL_VNC); if (opts->connected != SET_PASSWORD_ACTION_KEEP) { /* vnc supports "connected=keep" only */ - error_setg(errp, QERR_INVALID_PARAMETER, "connected"); + error_setg(errp, "parameter 'connected' must be 'keep'" + " when 'protocol' is 'vnc'"); return; } /* @@ -195,7 +196,7 @@ void qmp_client_migrate_info(const char *protocol, const char *hostname, } if (!has_port && !has_tls_port) { - error_setg(errp, QERR_MISSING_PARAMETER, "port/tls-port"); + error_setg(errp, "parameter 'port' or 'tls-port' is required"); return; } |