From patchwork Fri Feb 26 11:13:29 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: 8435781 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 D38CD9F314 for ; Fri, 26 Feb 2016 11:16:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1CCC20274 for ; Fri, 26 Feb 2016 11:16:51 +0000 (UTC) Received: from lists.xen.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 2588320212 for ; Fri, 26 Feb 2016 11:16:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aZGLf-0000uK-Nj; Fri, 26 Feb 2016 11:14:15 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aZGLf-0000tS-3g for xen-devel@lists.xensource.com; Fri, 26 Feb 2016 11:14:15 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id FB/85-03443-68330D65; Fri, 26 Feb 2016 11:14:14 +0000 X-Env-Sender: fu.wei@linaro.org X-Msg-Ref: server-6.tower-31.messagelabs.com!1456485252!25249537!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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13356 invoked from network); 26 Feb 2016 11:14:13 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-6.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 26 Feb 2016 11:14:13 -0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 27AEC51F; Fri, 26 Feb 2016 11:14:12 +0000 (UTC) Received: from magi-f22.redhat.com (vpn1-4-165.pek2.redhat.com [10.72.4.165]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1QBDrIJ027108; Fri, 26 Feb 2016 06:14:07 -0500 From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Fri, 26 Feb 2016 19:13:29 +0800 Message-Id: <1456485211-32695-3-git-send-email-fu.wei@linaro.org> In-Reply-To: <1456485211-32695-1-git-send-email-fu.wei@linaro.org> References: <1456485211-32695-1-git-send-email-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 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 v3 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=-1.9 required=5.0 tests=BAYES_00, 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 8ae43d7..d63e631 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;