From patchwork Tue May 10 14:03:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fu.wei@linaro.org X-Patchwork-Id: 9058201 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 C40899F1D3 for ; Tue, 10 May 2016 14:06:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D382620148 for ; Tue, 10 May 2016 14:06:08 +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 091DA20035 for ; Tue, 10 May 2016 14:06:08 +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 1b08Gf-0006kY-AO; Tue, 10 May 2016 14:04:09 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b08Gd-0006kM-7H for xen-devel@lists.xensource.com; Tue, 10 May 2016 14:04:07 +0000 Received: from [85.158.137.68] by server-1.bemta-3.messagelabs.com id 86/76-07924-65AE1375; Tue, 10 May 2016 14:04:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVysWW7jG7oK8N wgzn/TC3uTXnP7sDosb1vF3sAYxRrZl5SfkUCa8ad132MBZO4Kzo31DYwTuLsYuTiEBLYzSTR t+4+M4RzglHiy4q3QA4nB5uAuMSZzq+sILaIgJ3E3UM7WUBsZoHjjBK3f+uD2MICwRKrZ9xm6 2Lk4GARUJV4djEcJMwr4CgxtXMOWDmngJNEe/N5dhBbCCj+ZPkVsLiEgLbE8wuT2UH2Sgj0MU p8ffOSfQIjzwJGhlWM6sWpRWWpRbqmeklFmekZJbmJmTm6hgbGermpxcWJ6ak5iUnFesn5uZs YgV6vZ2Bg3MF4+avTIUZJDiYlUV7BKYbhQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR4eV4C5QSL UtNTK9Iyc4DhB5OW4OBREuHNeAGU5i0uSMwtzkyHSJ1iVJQS55UG6RMASWSU5sG1wUL+EqOsl DAvIwMDgxBPQWpRbmYJqvwrRnEORiVh3iaQKTyZeSVw018BLWYCWizHpg+yuCQRISXVwPigVt Zpp5ZlyaGeSfEKr9ODLd2MK/gr189bEnuGd/HW0rmvO0SPWB6x0HXzuvv3dpA7zy2dg0yFyq2 TkzweptuFlDZohQTVPKxy9DqdvI/JRe7wzycfdq08EG1k/tXsWEXrsQfHbR/druTcWBvjUSxq +dbl5Iak2sJjb+bd4nab4cbic81svRJLcUaioRZzUXEiADXw5pp0AgAA X-Env-Sender: fu.wei@linaro.org X-Msg-Ref: server-12.tower-31.messagelabs.com!1462889044!22700567!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29768 invoked from network); 10 May 2016 14:04:05 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-12.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 10 May 2016 14:04:05 -0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25E3E80083; Tue, 10 May 2016 14:04:04 +0000 (UTC) Received: from magi-f23.redhat.com (vpn1-7-22.pek2.redhat.com [10.72.7.22]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4AE3p2N000415; Tue, 10 May 2016 10:04:00 -0400 From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Tue, 10 May 2016 22:03:24 +0800 Message-Id: <1462889006-23671-3-git-send-email-fu.wei@linaro.org> In-Reply-To: <1462889006-23671-1-git-send-email-fu.wei@linaro.org> References: <1462889006-23671-1-git-send-email-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 10 May 2016 14:04:04 +0000 (UTC) Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, jcm@redhat.com, julien.grall@linaro.org, leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, Fu Wei Subject: [Xen-devel] [PATCH v4 2/4] arm64: add "--nounzip" option support in xen_module command 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: , MIME-Version: 1.0 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 From: Fu Wei This patch adds "--nounzip" option support in order to be compatible with the module command of i386, then we can simplify grub-mkconfig support code. Signed-off-by: Fu Wei --- grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index a914eb8..0878364 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), struct xen_boot_binary *module = NULL; grub_file_t file = 0; + int nounzip = 0; + + if (!argc) + { + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); + goto fail; + } + + if (grub_strcmp (argv[0], "--nounzip") == 0) + { + argv++; + argc--; + nounzip = 1; + } if (!argc) { @@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), grub_dprintf ("xen_loader", "Init module and node info\n"); + if (nounzip) + grub_file_filter_disable_compression (); file = grub_file_open (argv[0]); if (!file) goto fail;