From patchwork Tue Jul 26 09:13:41 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: 9247945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 841D660757 for ; Tue, 26 Jul 2016 09:16:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 745552621E for ; Tue, 26 Jul 2016 09:16:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66D8026B39; Tue, 26 Jul 2016 09:16:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F4802621E for ; Tue, 26 Jul 2016 09:16:49 +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 1bRyRL-0001iX-8C; Tue, 26 Jul 2016 09:14:15 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRyRJ-0001hy-Us for xen-devel@lists.xensource.com; Tue, 26 Jul 2016 09:14:14 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 82/BA-27233-5E927975; Tue, 26 Jul 2016 09:14:13 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRWlGSWpSXmKPExsVysWW7jO4Tzen hBp+OmFrcm/Ke3YHRY3vfLvYAxijWzLyk/IoE1ow7r/sYCyZxV3RuqG1gnMTZxcjFISSwm0mi 4dxzJgjnLKPEtvfNzF2MnBxsAuISZzq/soLYIgJ2EncP7WQBKWIWeMIo8WXiNyaQhLBAsMSxJ 2vZQGwWAVWJq7PPMoLYvAIOEs/ezmUHsTkFHCUWL58HNlQIKN417z/YUAkBbYmGWZPBhkoI9D FKnDh6nnECI88CRoZVjOrFqUVlqUW6hnpJRZnpGSW5iZk5uoYGxnq5qcXFiempOYlJxXrJ+bm bGIGeZwCCHYzLPzodYpTkYFIS5WWaMC1ciC8pP6UyI7E4I76oNCe1+BCjDAeHkgRvkcb0cCHB otT01Iq0zBxgCMKkJTh4lER4M0DSvMUFibnFmekQqVOMilLivE4gCQGQREZpHlwbLOwvMcpKC fMyAh0ixFOQWpSbWYIq/4pRnINRSZi3HmQKT2ZeCdz0V0CLmYAWL+CZDLK4JBEhJdXA2KlZ6F F82fixz+IFDxRuscec4Et+vfa5zu5G12sNrvHPP9x8nvP0PGOUuLPW3JOMr5f//JE8hzfONjt lbljl5F15Zxa3tDP3Wty/3H+qRzAnQmlFw7xZb3MkXtYZCzLelhR8unvuhl8yjDprquzvpcRm HXi8TLA+i8Gk7VLIzY4VXYzLb071U2Ipzkg01GIuKk4EAMk/T/92AgAA X-Env-Sender: fu.wei@linaro.org X-Msg-Ref: server-2.tower-31.messagelabs.com!1469524451!52384935!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.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 57489 invoked from network); 26 Jul 2016 09:14:12 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-2.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 26 Jul 2016 09:14:12 -0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 A0B453B716; Tue, 26 Jul 2016 09:14:10 +0000 (UTC) Received: from rei-ayanami.redhat.com (vpn1-6-159.pek2.redhat.com [10.72.6.159]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6Q9Du0O028034; Tue, 26 Jul 2016 05:14:06 -0400 From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Tue, 26 Jul 2016 17:13:41 +0800 Message-Id: <1469524423-7082-3-git-send-email-fu.wei@linaro.org> In-Reply-To: <1469524423-7082-1-git-send-email-fu.wei@linaro.org> References: <1469524423-7082-1-git-send-email-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 26 Jul 2016 09:14:10 +0000 (UTC) Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, jcm@redhat.com, leif.lindholm@linaro.org, julien.grall@arm.com, sstabellini@kernel.org, linaro-uefi@lists.linaro.org, Fu Wei Subject: [Xen-devel] [PATCH v6 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-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;