From patchwork Fri Mar 13 19:36:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 450068 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F054E140119 for ; Sat, 14 Mar 2015 06:38:47 +1100 (AEDT) Received: from localhost ([::1]:38376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWVPx-0003kE-Vc for incoming@patchwork.ozlabs.org; Fri, 13 Mar 2015 15:38:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWVOa-0001YZ-3b for qemu-devel@nongnu.org; Fri, 13 Mar 2015 15:37:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWVOV-0007Sr-Un for qemu-devel@nongnu.org; Fri, 13 Mar 2015 15:37:20 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:26331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWVOV-0007Sj-O3 for qemu-devel@nongnu.org; Fri, 13 Mar 2015 15:37:15 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t2DJbAMT029878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Mar 2015 19:37:11 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t2DJb974011314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Mar 2015 19:37:09 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t2DJb95W017405; Fri, 13 Mar 2015 19:37:09 GMT Received: from l.oracle.com (/10.137.178.253) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 Mar 2015 12:37:09 -0700 Received: by l.oracle.com (Postfix, from userid 1000) id 681A06A3C4F; Fri, 13 Mar 2015 15:37:00 -0400 (EDT) From: Konrad Rzeszutek Wilk To: qemu-devel@nongnu.org, stefano.stabellini@eu.citrix.com, xen-devel@lists.xenproject.org Date: Fri, 13 Mar 2015 15:36:57 -0400 Message-Id: <1426275418-8411-2-git-send-email-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1426275418-8411-1-git-send-email-konrad.wilk@oracle.com> References: <1426275418-8411-1-git-send-email-konrad.wilk@oracle.com> X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 Cc: Konrad Rzeszutek Wilk Subject: [Qemu-devel] [PATCH RFC v1 1/2] xen/hw/passthrough: Use errno instead of ret for xc_physdev_map_* calls 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 As the libxc library follows (mostly) the return negative for failure and stashes the error value in errno. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Stefano Stabellini --- hw/xen/xen_pt.c | 4 ++-- hw/xen/xen_pt_msi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index c1bf357..d2c187d 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -691,8 +691,8 @@ static int xen_pt_initfn(PCIDevice *d) rc = xc_physdev_map_pirq(xen_xc, xen_domid, machine_irq, &pirq); if (rc < 0) { - XEN_PT_ERR(d, "Mapping machine irq %u to pirq %i failed, (rc: %d)\n", - machine_irq, pirq, rc); + XEN_PT_ERR(d, "Mapping machine irq %u to pirq %i failed, (err: %d)\n", + machine_irq, pirq, errno); /* Disable PCI intx assertion (turn on bit10 of devctl) */ xen_host_pci_set_word(&s->real_device, diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c index 9ed9321..b01921a 100644 --- a/hw/xen/xen_pt_msi.c +++ b/hw/xen/xen_pt_msi.c @@ -132,8 +132,8 @@ static int msi_msix_setup(XenPCIPassthroughState *s, msix_entry, table_base); if (rc) { XEN_PT_ERR(&s->dev, - "Mapping of MSI%s (rc: %i, vec: %#x, entry %#x)\n", - is_msix ? "-X" : "", rc, gvec, msix_entry); + "Mapping of MSI%s (err: %i, vec: %#x, entry %#x)\n", + is_msix ? "-X" : "", errno, gvec, msix_entry); return rc; } }