From patchwork Tue Apr 26 14:52: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: 8939651 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 1E2A4BF440 for ; Tue, 26 Apr 2016 14:55:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FDAF20125 for ; Tue, 26 Apr 2016 14:55:18 +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 3F3AB201FE for ; Tue, 26 Apr 2016 14:55:17 +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 1av4MY-0007ir-Dr; Tue, 26 Apr 2016 14:53:18 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av4MX-0007gq-1j for xen-devel@lists.xenproject.org; Tue, 26 Apr 2016 14:53:17 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id 43/91-15045-CD08F175; Tue, 26 Apr 2016 14:53:16 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHRDpO7tBvl wg54txhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aXva9ZC/bxVexc3MjSwPiZq4uRk0NCwF9i 7eHZTCA2m4COxMW5O9m6GDk4RARUJG7vNQAJMwsUS3xd1ccKYgsLuEk0TN7ODlLCIqAqcQFiC q+Aq8TcKV9ZISbqSpzcvYkdxOYEim9e8ApsupCAi8SSTY/ZIeoFJU7OfMICMV5TonX7b3YIW1 6ieetsZoh6RYn+eQ/YIGZyS9w+PZV5AiP/LCTts5C0z0LSvoCReRWjenFqUVlqka6FXlJRZnp GSW5iZo6uoYGpXm5qcXFiempOYlKxXnJ+7iZGYPgxAMEOxoPNzocYJTmYlER57+XJhwvxJeWn VGYkFmfEF5XmpBYfYpTh4FCS4N1SD5QTLEpNT61Iy8wBRgJMWoKDR0mEdx9Imre4IDG3ODMdI nWKUVFKnHcKSEIAJJFRmgfXBou+S4yyUsK8jECHCPEUpBblZpagyr9iFOdgVBLmPQcyhSczrw Ru+iugxUxAiy8fkgVZXJKIkJJqYLR/+kB2TYLucXuLHatrnRSnNL2s4qxjd57dOUf6dpHj3rp oTSnJRs9tfPXRa2arn+Lu2Lvu5u9LDKutOI0+r9m77k3ER66q28qTeDREXd9dW6P7csujmKXm zfrb/lzVlXLt5QoUOew/b0PI450v+hZw9B6/vmmfSonL3vVGXw5d083SfX+WqVyJpTgj0VCLu ag4EQDUZJ7QuQIAAA== X-Env-Sender: prvs=917dd492e=roger.pau@citrix.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1461682390!36273542!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 26692 invoked from network); 26 Apr 2016 14:53:15 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 26 Apr 2016 14:53:15 -0000 X-IronPort-AV: E=Sophos;i="5.24,537,1454976000"; d="scan'208";a="349876669" From: Roger Pau Monne To: Date: Tue, 26 Apr 2016 16:52:18 +0200 Message-ID: <1461682343-20597-10-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1461682343-20597-1-git-send-email-roger.pau@citrix.com> References: <1461682343-20597-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 v2 for-4.7 09/14] 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 --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/xl_cmdimpl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8ff54e1..2ebca0a 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -5894,16 +5894,18 @@ static void output_xeninfo(void) { const libxl_version_info *info; libxl_scheduler sched; + int sched_rc; if (!(info = libxl_get_version_info(ctx))) { fprintf(stderr, "libxl_get_version_info failed.\n"); return; } - if ((sched = libxl_get_scheduler(ctx)) < 0) { + if ((sched_rc = libxl_get_scheduler(ctx)) < 0) { fprintf(stderr, "get_scheduler sysctl failed.\n"); return; } + sched = sched_rc; printf("xen_major : %d\n", info->xen_version_major); printf("xen_minor : %d\n", info->xen_version_minor); @@ -7991,7 +7993,7 @@ int main_cpupoolcreate(int argc, char **argv) libxl_scheduler sched = 0; XLU_ConfigList *cpus; XLU_ConfigList *nodes; - int n_cpus, n_nodes, i, n; + int n_cpus, n_nodes, i, n, sched_rc; libxl_bitmap freemap; libxl_bitmap cpumap; libxl_uuid uuid; @@ -8084,10 +8086,12 @@ int main_cpupoolcreate(int argc, char **argv) goto out_cfg; } } else { - if ((sched = libxl_get_scheduler(ctx)) < 0) { + if ((sched_rc = libxl_get_scheduler(ctx)) < 0) { fprintf(stderr, "get_scheduler sysctl failed.\n"); + rc = EXIT_FAILURE; goto out_cfg; } + sched = sched_rc; } if (libxl_get_freecpus(ctx, &freemap)) {