From patchwork Wed Oct 10 14:02:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [12/25] qemu-ga: ask and print error information from qemu-sockets Date: Wed, 10 Oct 2012 04:02:53 -0000 From: Paolo Bonzini X-Patchwork-Id: 190703 Message-Id: <1349877786-23514-13-git-send-email-pbonzini@redhat.com> To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com 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);