From patchwork Fri Jul 13 10:38:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 170841 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D3F072C0358 for ; Fri, 13 Jul 2012 20:38:30 +1000 (EST) Received: from localhost ([::1]:47256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpdGW-0000Nr-TY for incoming@patchwork.ozlabs.org; Fri, 13 Jul 2012 06:38:28 -0400 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 d06nrmr1407.portsmouth.uk.ibm.com (9.149.38.185) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 13 Jul 2012 11:38:10 +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 Received: from localhost (stefanha-thinkpad.manchester-maybrook.uk.ibm.com [9.174.219.145]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6DAc6Uc007987; Fri, 13 Jul 2012 04:38:06 -0600 From: Stefan Hajnoczi To: Anthony Liguori Date: Fri, 13 Jul 2012 11:38:00 +0100 Message-Id: <1342175882-4995-4-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.10.4 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> x-cbid: 12071310-2966-0000-0000-000004B4BC8C X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.109 Cc: Amos Kong , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 3/5] vnc: add a more descriptive error message X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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));