1 Star 0 Fork 131

JianChunfu/src-qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ui-qmp-cmds-Improve-two-error-messages.patch 2.25 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2023-12-05 18:00 +08:00 . QEMU update to version 6.2.0-86(master)
From 0425d773b3fa0da62be489ae6c76d1805f28f388 Mon Sep 17 00:00:00 2001
From: boringandboring <wangjinlei_yewu@cmss.chinamobile.com>
Date: Mon, 27 Nov 2023 15:47:21 +0800
Subject: [PATCH] ui/qmp-cmds: Improve two error messages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cherry picked from 517b0220efd421acf885eed109571a61e95b192a
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>
Signed-off-by: boringandboring <wangjinlei_yewu@cmss.chinamobile.com>
---
monitor/misc.c | 2 +-
monitor/qmp-cmds.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/monitor/misc.c b/monitor/misc.c
index a3a6e47844..25a23e2290 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -397,7 +397,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;
}
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index d71beace6a..b44cca8234 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -199,7 +199,8 @@ void qmp_set_password(const char *protocol, const char *password,
} else if (strcmp(protocol, "vnc") == 0) {
if (fail_if_connected || disconnect_if_connected) {
/* 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;
}
/* Note that setting an empty password will not disable login through
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jianchunfu/src-qemu.git
git@gitee.com:jianchunfu/src-qemu.git
jianchunfu
src-qemu
src-qemu
master

搜索帮助