From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJQ5L-0005Zi-AV for qemu-devel@nongnu.org; Wed, 03 Oct 2012 10:38:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJQ5E-0000ME-Hv for qemu-devel@nongnu.org; Wed, 03 Oct 2012 10:38:03 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJQ5E-0000GD-B6 for qemu-devel@nongnu.org; Wed, 03 Oct 2012 10:37:56 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so6493677pad.4 for ; Wed, 03 Oct 2012 07:37:56 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 3 Oct 2012 16:36:59 +0200 Message-Id: <1349275025-5093-13-git-send-email-pbonzini@redhat.com> In-Reply-To: <1349275025-5093-1-git-send-email-pbonzini@redhat.com> References: <1349275025-5093-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 12/18] 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 Cc: lcapitulino@redhat.com 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