From patchwork Wed Oct 10 14:02:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 190703 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 9C0842C008B for ; Thu, 11 Oct 2012 02:50:03 +1100 (EST) Received: from localhost ([::1]:38687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwtu-0003Pe-7J for incoming@patchwork.ozlabs.org; Wed, 10 Oct 2012 10:04:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwt4-0002Kw-Vx for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLwsz-0002Dm-30 for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:50 -0400 Received: from mail-da0-f45.google.com ([209.85.210.45]:46951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwsy-00025i-Sv for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:45 -0400 Received: by mail-da0-f45.google.com with SMTP id n15so189690dad.4 for ; Wed, 10 Oct 2012 07:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=cXGcFtSiXuozcPmj21YgsN2WdoiUC6Dt2e3TR/igsIE=; b=hO0mO/4lU4UeKyTdrhyBl6h53A5n/DCCF1gtgF0iIfSULn5hY0h+fwZfPgVTO2zKCN qnInoNTSEHgbSw3r6UFT/SunaJ7A7ML0u+/a6BHlDW31yXAkzd0LJelAdTD2fevaTgUf 9vnXeUNQ/h0KevS5RDYYbaR6qZjJjYfgJOfPHU4xsdfF/YGSQl6ZPKpbhaxPY6vS2mWk GR1NUVkTZK+4qKzD2RSpn/AKHqrViGAkDT5aleZ8iP0CnsXM456kdJSMtZ0AYhK/ndML e7SjiZdTLOgLzY8LdY7ruuxWud13SySaWJTDwZjk4+mcukHHtZo9lA2f6O2bPLuv6x1N 0nvg== Received: by 10.68.136.229 with SMTP id qd5mr73807039pbb.154.1349877824545; Wed, 10 Oct 2012 07:03:44 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id n7sm905723pav.26.2012.10.10.07.03.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 07:03:44 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 10 Oct 2012 16:02:53 +0200 Message-Id: <1349877786-23514-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> References: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.45 Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH 12/25] qemu-ga: ask and print error information from qemu-sockets 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 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);