From patchwork Wed Jul 6 17:53:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 71481 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp989719qgy; Wed, 6 Jul 2016 10:54:59 -0700 (PDT) X-Received: by 10.55.16.232 with SMTP id 101mr33261260qkq.151.1467827699516; Wed, 06 Jul 2016 10:54:59 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z184si2684210qkd.113.2016.07.06.10.54.59; Wed, 06 Jul 2016 10:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2E51F68470; Wed, 6 Jul 2016 17:54:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D941F6845A; Wed, 6 Jul 2016 17:54:46 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 80AD66846E; Wed, 6 Jul 2016 17:54:43 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by lists.linaro.org (Postfix) with ESMTPS id CAE936846B for ; Wed, 6 Jul 2016 17:54:29 +0000 (UTC) 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 047AC6331B; Wed, 6 Jul 2016 17:54:29 +0000 (UTC) Received: from rei-ayanami.redhat.com (vpn1-4-195.pek2.redhat.com [10.72.4.195]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u66HsGha009158; Wed, 6 Jul 2016 13:54:25 -0400 From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Thu, 7 Jul 2016 01:53:55 +0800 Message-Id: <1467827637-14508-3-git-send-email-fu.wei@linaro.org> In-Reply-To: <1467827637-14508-1-git-send-email-fu.wei@linaro.org> References: <1467827637-14508-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.39]); Wed, 06 Jul 2016 17:54:29 +0000 (UTC) Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, jcm@redhat.com, julien.grall@arm.com, sstabellini@kernel.org, linaro-uefi@lists.linaro.org Subject: [Linaro-uefi] [PATCH v5 2/4] arm64: add "--nounzip" option support in xen_module command X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" 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;