]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vnc: Tweak error when init fails
authorCole Robinson <crobinso@redhat.com>
Tue, 5 May 2015 15:07:18 +0000 (11:07 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 20 May 2015 08:23:08 +0000 (10:23 +0200)
Before:
qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server on `(null)': Failed to bind socket to /root/foo.sock: Permission denied

After:
qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server: Failed to bind socket to /root/foo.sock: Permission denied

Rather than tweak the string possibly show unix: value as well,
just drop the explicit display reporting. We already get the cli
string in the error message, that should be sufficient.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc.c

index fe4cd759a1e45cc3ffe21e81a96ad36b504bfb11..1013ea5c45c97a013d5daaa8feab7255f16192b6 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3779,8 +3779,7 @@ int vnc_init_func(QemuOpts *opts, void *opaque)
     vnc_display_init(id);
     vnc_display_open(id, &local_err);
     if (local_err != NULL) {
-        error_report("Failed to start VNC server on `%s': %s",
-                     qemu_opt_get(opts, "display"),
+        error_report("Failed to start VNC server: %s",
                      error_get_pretty(local_err));
         error_free(local_err);
         exit(1);