From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPChf-00068p-FP for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:33:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPChX-0006WS-Ne for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:33:31 -0400 Received: from mail-da0-f45.google.com ([209.85.210.45]:53210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPChX-00061I-I5 for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:33:23 -0400 Received: by mail-da0-f45.google.com with SMTP id n15so238415dad.4 for ; Fri, 19 Oct 2012 06:33:23 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 19 Oct 2012 15:31:51 +0200 Message-Id: <1350653528-5834-13-git-send-email-pbonzini@redhat.com> In-Reply-To: <1350653528-5834-1-git-send-email-pbonzini@redhat.com> References: <1350653528-5834-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 12/29] qemu-ga: ask and print error information from qemu-sockets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Reviewed-by: Luiz Capitulino Signed-off-by: Paolo Bonzini --- qga/channel-posix.c | 8 +++++--- 1 file modificato, 5 inserzioni(+), 3 rimozioni(-) diff --git a/qga/channel-posix.c b/qga/channel-posix.c index e22eee6..d152827 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -181,9 +181,11 @@ static gboolean ga_channel_open(GAChannel *c, const gchar *path, GAChannelMethod break; } case GA_CHANNEL_UNIX_LISTEN: { - int fd = unix_listen(path, NULL, strlen(path), NULL); - if (fd == -1) { - g_critical("error opening path: %s", strerror(errno)); + Error *local_err = NULL; + int fd = unix_listen(path, NULL, strlen(path), &local_err); + if (local_err != NULL) { + g_critical("%s", error_get_pretty(local_err)); + error_free(local_err); return false; } ga_channel_listen_add(c, fd, true); -- 1.7.12.1