Received: from eggs.gnu.org ([208.118.235.92]:33975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpdGH-0000NI-7A for qemu-devel@nongnu.org; Fri, 13 Jul 2012 06:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SpdGG-0003ds-7g for qemu-devel@nongnu.org; Fri, 13 Jul 2012 06:38:13 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:38115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpdGF-0003dg-Vr for qemu-devel@nongnu.org; Fri, 13 Jul 2012 06:38:12 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Jul 2012 11:38:11 +0100 Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6DAc6QE2478210 for ; Fri, 13 Jul 2012 11:38:06 +0100 Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6DAc67F007997 for ; Fri, 13 Jul 2012 04:38:06 -0600 From: Stefan Hajnoczi Date: Fri, 13 Jul 2012 11:38:00 +0100 Message-Id: <1342175882-4995-4-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1342175882-4995-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1342175882-4995-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 3/5] vnc: add a more descriptive error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Amos Kong , qemu-devel@nongnu.org, Stefan Hajnoczi From: Amos Kong Currently qemu outputs some low-level error in qemu-sockets.c when failed to start vnc server. eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known' Some libvirt users could not know what's happened with this unclear error message. This patch added a more descriptive error message. Signed-off-by: Amos Kong Reviewed-by: Michael Tokarev Signed-off-by: Stefan Hajnoczi --- vl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 2e140f5..46248b9 100644 --- a/vl.c +++ b/vl.c @@ -3584,8 +3584,11 @@ int main(int argc, char **argv, char **envp) /* init remote displays */ if (vnc_display) { vnc_display_init(ds); - if (vnc_display_open(ds, vnc_display) < 0) + if (vnc_display_open(ds, vnc_display) < 0) { + fprintf(stderr, "Failed to start VNC server on `%s'\n", + vnc_display); exit(1); + } if (show_vnc_port) { printf("VNC server running on `%s'\n", vnc_display_local_addr(ds)); -- 1.7.10.4