From patchwork Wed Apr 27 11:11:47 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: 8955191 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1AD089F6CD for ; Wed, 27 Apr 2016 11:14:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 463872022A for ; Wed, 27 Apr 2016 11:14:46 +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 7C49820272 for ; Wed, 27 Apr 2016 11:14:44 +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 1avNOn-0003hP-3q; Wed, 27 Apr 2016 11:12:53 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avNOl-0003g9-U4 for xen-devel@lists.xenproject.org; Wed, 27 Apr 2016 11:12:52 +0000 Received: from [85.158.139.211] by server-11.bemta-5.messagelabs.com id 1A/E9-27787-3BE90275; Wed, 27 Apr 2016 11:12:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHSDve7meQr hBj838ll83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBm7l5xiLNjBU3Hiv3QD42rOLkZODgkBf4k5 y3pZQWw2AR2Ji3N3snUxcnCICKhI3N5rABJmFiiW+LqqD6xEWMBNYmlHDxOIzSKgKrFg9n52E JtXwFVi3p+ZjBAjdSVO7t4EFucEirc1TWABsYUEXCSe3r7DClEvKHFy5hMWiPmaEq3bf7ND2P ISzVtnM0PUK0r0z3vABjGTW+L26anMExj5ZyFpn4WkfRaS9gWMzKsY1YtTi8pSi3QN9ZKKMtM zSnITM3N0DQ1M9XJTi4sT01NzEpOK9ZLzczcxAsOvnoGBcQdjU6/zIUZJDiYlUd6F7QrhQnxJ +SmVGYnFGfFFpTmpxYcYZTg4lCR4T88FygkWpaanVqRl5gAjASYtwcGjJMJbPwcozVtckJhbn JkOkTrFqCglzpsI0icAksgozYNrg0XfJUZZKWFeRgYGBiGegtSi3MwSVPlXjOIcjErCvAdApv Bk5pXATX8FtJgJaPHlQ7Igi0sSEVJSDYzTYx3c9G5Ll505qaVeUxZ9/+2W597HWu/s+sDJOfF G57qfJ9/bLVu7uuBa6LEm/bpDn7jfLq5t3H7jYe2jevFH9/p/3EiZdK11i+OfTYkKXncvVeZ0 7Mvv8Hjz0T/8anPc2ru+IVuELTTZHoqqCAbGTvKPndF043hT2QaBi+3/q+5me397F2CoxFKck WioxVxUnAgADD5HJ7kCAAA= X-Env-Sender: prvs=918322aae=roger.pau@citrix.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1461755568!36497476!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 54491 invoked from network); 27 Apr 2016 11:12:50 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-7.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 27 Apr 2016 11:12:50 -0000 X-IronPort-AV: E=Sophos;i="5.24,541,1454976000"; d="scan'208";a="356738727" From: Roger Pau Monne To: Date: Wed, 27 Apr 2016 13:11:47 +0200 Message-ID: <1461755514-23754-10-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1461755514-23754-1-git-send-email-roger.pau@citrix.com> References: <1461755514-23754-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Wei Liu , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v3 for-4.7 09/16] xl: fix usage of libxl_get_scheduler 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 It returns an int, not a libxl_scheduler. Signed-off-by: Roger Pau Monné Reviewed-by: Doug Goldstein Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- Changes since v2: - s/sched_rc/rc/ --- tools/libxl/xl_cmdimpl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8ff54e1..dfb1b01 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -5894,16 +5894,19 @@ static void output_xeninfo(void) { const libxl_version_info *info; libxl_scheduler sched; + int rc; if (!(info = libxl_get_version_info(ctx))) { fprintf(stderr, "libxl_get_version_info failed.\n"); return; } - if ((sched = libxl_get_scheduler(ctx)) < 0) { + rc = libxl_get_scheduler(ctx); + if (rc < 0) { fprintf(stderr, "get_scheduler sysctl failed.\n"); return; } + sched = rc; printf("xen_major : %d\n", info->xen_version_major); printf("xen_minor : %d\n", info->xen_version_minor); @@ -8084,10 +8087,12 @@ int main_cpupoolcreate(int argc, char **argv) goto out_cfg; } } else { - if ((sched = libxl_get_scheduler(ctx)) < 0) { + rc = libxl_get_scheduler(ctx); + if (rc < 0) { fprintf(stderr, "get_scheduler sysctl failed.\n"); goto out_cfg; } + sched = rc; } if (libxl_get_freecpus(ctx, &freemap)) {