From patchwork Fri Apr 29 14:21:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8983291 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 12130BF29F for ; Fri, 29 Apr 2016 14:25:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40BEF201CD for ; Fri, 29 Apr 2016 14:25:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61585201C0 for ; Fri, 29 Apr 2016 14:25:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aw9IZ-0005qs-OY; Fri, 29 Apr 2016 14:21:39 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aw9IY-0005qi-LO for xen-devel@lists.xenproject.org; Fri, 29 Apr 2016 14:21:38 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 76/F1-04147-1FD63275; Fri, 29 Apr 2016 14:21:37 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRWlGSWpSXmKPExsXitHRDpO7HXOV wg+u/xC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1owPv9cwFTRxVSxedZqtgfE4excjJ4eEgL/E od6PYDabgI7Exbk72boYOThEBFQkbu816GLk4mAWuMQosXHSNVaQuLCAvcSGq9Ug5SwCqhJH1 q0Da+UVcJE4cHMBG8RIXYmTuzeBxTkFXCVWr3jHDtIqBFSzd60zRLmgxMmZT1hAbGYBTYnW7b /ZIWx5ieats5lBbCEBRYn+eQ/ArpEQ4Jb4220/gZF/FpLuWUi6ZyHpXsDIvIpRvTi1qCy1SNd IL6koMz2jJDcxM0fX0MBULze1uDgxPTUnMalYLzk/dxMjMPgYgGAH4/c/TocYJTmYlER5r+oq hwvxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4L2WA5QTLEpNT61Iy8wBxgFMWoKDR0mE9wJImre4I DG3ODMdInWKUVFKnPcLSEIAJJFRmgfXBou9S4yyUsK8jECHCPEUpBblZpagyr9iFOdgVBLm/Q AyhSczrwRu+iugxUxAiwU2KYIsLklESEk1MBa3O65KX8/nF7yO93/AYvnuHKNwrWe74syqetZ siSjX4jH8aHKs5HSZ4aZPrCE/hNyWpx1JnrXIoKi5j/Oh9BKTTI1luy5NvfBkdpl1jzT3r7mr tsgFTay5oXt1/8aT9wzyH4hnCDnx9/q5SP3/rTMjXibde5ED0//H2o4/2YM3LN3rf+PoAyWW4 oxEQy3mouJEAHkwKb24AgAA X-Env-Sender: prvs=9202e7170=roger.pau@citrix.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1461939691!780758!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 2007 invoked from network); 29 Apr 2016 14:21:37 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-12.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 29 Apr 2016 14:21:37 -0000 X-IronPort-AV: E=Sophos;i="5.24,551,1454976000"; d="scan'208";a="350725903" From: Roger Pau Monne To: Date: Fri, 29 Apr 2016 16:21:18 +0200 Message-ID: <1461939680-32574-3-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1461939680-32574-1-git-send-email-roger.pau@citrix.com> References: <1461939680-32574-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ross Lagerwall , Ian Jackson , Wei Liu , Roger Pau Monne Subject: [Xen-devel] [PATCH for-4.7 2/4] tools/xsplice: corrently use errno X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some error paths incorrectly used rc instead of errno. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall Cc: Ian Jackson Cc: Wei Liu --- tools/misc/xen-xsplice.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c index 0f1ab5a..695be7f 100644 --- a/tools/misc/xen-xsplice.c +++ b/tools/misc/xen-xsplice.c @@ -273,7 +273,7 @@ int action_func(int argc, char *argv[], unsigned int idx) if ( rc ) { fprintf(stderr, "%s failed to get status (rc=%d, %s)!\n", - name, -rc, strerror(-rc)); + name, errno, strerror(errno)); return -1; } if ( status.rc == -EAGAIN ) @@ -295,7 +295,8 @@ int action_func(int argc, char *argv[], unsigned int idx) rc = action_options[idx].function(xch, name, 0); if ( rc ) { - fprintf(stderr, "%s failed with %d(%s)\n", name, -rc, strerror(-rc)); + fprintf(stderr, "%s failed with %d(%s)\n", name, errno, + strerror(errno)); return -1; } }