From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJrug-0002i0-2a for qemu-devel@nongnu.org; Thu, 04 Oct 2012 16:20:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJrue-000565-O2 for qemu-devel@nongnu.org; Thu, 04 Oct 2012 16:20:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJrue-00055W-2u for qemu-devel@nongnu.org; Thu, 04 Oct 2012 16:20:52 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q94KKpgS030265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Oct 2012 16:20:51 -0400 Date: Thu, 4 Oct 2012 17:21:44 -0300 From: Luiz Capitulino Message-ID: <20121004172144.42789d74@doriath.home> In-Reply-To: <1349275025-5093-13-git-send-email-pbonzini@redhat.com> References: <1349275025-5093-1-git-send-email-pbonzini@redhat.com> <1349275025-5093-13-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [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: Paolo Bonzini Cc: qemu-devel@nongnu.org On Wed, 3 Oct 2012 16:36:59 +0200 Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini Reviewed-by: Luiz Capitulino > --- > 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);