From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyH2K-000743-BM for qemu-devel@nongnu.org; Fri, 29 May 2015 05:57:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyH2F-0003cO-Tu for qemu-devel@nongnu.org; Fri, 29 May 2015 05:57:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyH2F-0003c4-Nb for qemu-devel@nongnu.org; Fri, 29 May 2015 05:57:03 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id EF8D12CD857 for ; Fri, 29 May 2015 09:57:02 +0000 (UTC) From: Markus Armbruster Date: Fri, 29 May 2015 11:56:42 +0200 Message-Id: <1432893420-18687-4-git-send-email-armbru@redhat.com> In-Reply-To: <1432893420-18687-1-git-send-email-armbru@redhat.com> References: <1432893420-18687-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v3 03/21] monitor: Improve and document client_migrate_info protocol error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , lcapitulino@redhat.com Protocol must be spice, vnc isn't implemented. Fix up documentation. Attempts to use vnc or any other unknown protocol yield the misleading error message "Invalid parameter 'protocol'". Improve it to "Parameter 'protocol' expects spice". Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by. Gerd Hoffmann Reviewed-by: Luiz Capitulino --- hmp-commands.hx | 8 ++++---- monitor.c | 2 +- qmp-commands.hx | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index e864a6c..0cf592b 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1011,7 +1011,7 @@ ETEXI .name = "client_migrate_info", .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?", .params = "protocol hostname port tls-port cert-subject", - .help = "send migration info to spice/vnc client", + .help = "set migration information for remote display", .user_print = monitor_user_noop, .mhandler.cmd_new = client_migrate_info, }, @@ -1019,9 +1019,9 @@ ETEXI STEXI @item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject} @findex client_migrate_info -Set the spice/vnc connection info for the migration target. The spice/vnc -server will ask the spice/vnc client to automatically reconnect using the -new parameters (if specified) once the vm migration finished successfully. +Set migration information for remote display. This makes the server +ask the client to automatically reconnect using the new parameters +once migration finished successfully. Only implemented for SPICE. ETEXI { diff --git a/monitor.c b/monitor.c index 416ba10..8170309 100644 --- a/monitor.c +++ b/monitor.c @@ -1063,7 +1063,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict, return 0; } - qerror_report(QERR_INVALID_PARAMETER, "protocol"); + qerror_report(QERR_INVALID_PARAMETER_VALUE, "protocol", "spice"); return -1; } diff --git a/qmp-commands.hx b/qmp-commands.hx index 14e109e..a9768a2 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -784,23 +784,23 @@ EQMP .name = "client_migrate_info", .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?", .params = "protocol hostname port tls-port cert-subject", - .help = "send migration info to spice/vnc client", + .help = "set migration information for remote display", .mhandler.cmd_new = client_migrate_info, }, SQMP client_migrate_info ------------------- +------------------- -Set the spice/vnc connection info for the migration target. The spice/vnc -server will ask the spice/vnc client to automatically reconnect using the -new parameters (if specified) once the vm migration finished successfully. +Set migration information for remote display. This makes the server +ask the client to automatically reconnect using the new parameters +once migration finished successfully. Only implemented for SPICE. Arguments: -- "protocol": protocol: "spice" or "vnc" (json-string) +- "protocol": must be "spice" (json-string) - "hostname": migration target hostname (json-string) -- "port": spice/vnc tcp port for plaintext channels (json-int, optional) +- "port": spice tcp port for plaintext channels (json-int, optional) - "tls-port": spice tcp port for tls-secured channels (json-int, optional) - "cert-subject": server certificate subject (json-string, optional) -- 1.9.3