diff mbox

[v3,2/3] vnc: Tweak error when init fails

Message ID 1ad1da2188f9e3301d2a452d6585786bb2852b0d.1430838327.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson May 5, 2015, 3:07 p.m. UTC
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>
---
v3:
    No change

 ui/vnc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index e1abf64..b3450ec 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3780,8 +3780,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);