From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuzSI-0000PJ-IE for qemu-devel@nongnu.org; Wed, 20 May 2015 04:34:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuzSF-0007Bz-9h for qemu-devel@nongnu.org; Wed, 20 May 2015 04:34:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuzSF-0007BV-2l for qemu-devel@nongnu.org; Wed, 20 May 2015 04:34:19 -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 (8.14.4/8.14.4) with ESMTP id t4K8YIcF015639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 20 May 2015 04:34:18 -0400 From: Gerd Hoffmann Date: Wed, 20 May 2015 10:34:12 +0200 Message-Id: <1432110853-11399-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1432110853-11399-1-git-send-email-kraxel@redhat.com> References: <1432110853-11399-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 4/5] vnc: Tweak error when init fails List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Cole Robinson From: Cole Robinson 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 Reviewed-by: Eric Blake Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index fe4cd75..1013ea5 100644 --- 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); -- 1.8.3.1