]> git.proxmox.com Git - mirror_qemu.git/commitdiff
monitor: Improve and document client_migrate_info protocol error
authorMarkus Armbruster <armbru@redhat.com>
Thu, 5 Mar 2015 18:16:58 +0000 (19:16 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 2 Jun 2015 07:59:13 +0000 (09:59 +0200)
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 <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by. Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
hmp-commands.hx
monitor.c
qmp-commands.hx

index e864a6ca81222b7c60efca5d79bdc3acd3bfbb72..0cf592bcf8f0213f5c9a21d1d2d6a4d622ff5c1d 100644 (file)
@@ -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
 
     {
index 416ba107304c2616b3c77a8bb0091069eb8bf237..81703093f91f433e555ba08a3f5d64243c362541 100644 (file)
--- 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;
 }
 
index 14e109eb5cc8f51bc3a4424603f6c4e6606938e3..a9768a25b6ec50ef698de27285c2fdb2315fe940 100644 (file)
@@ -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)