From mboxrd@z Thu Jan 1 00:00:00 1970 From: fu.wei@linaro.org Subject: [PATCH v3 2/4] arm64: add "--nounzip" option support in xen_module command Date: Fri, 26 Feb 2016 19:13:29 +0800 Message-ID: <1456485211-32695-3-git-send-email-fu.wei@linaro.org> References: <1456485211-32695-1-git-send-email-fu.wei@linaro.org> Reply-To: The development of GNU GRUB Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1456485211-32695-1-git-send-email-fu.wei@linaro.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: grub-devel-bounces+gcbgd-grub-devel=m.gmane.org@gnu.org Sender: grub-devel-bounces+gcbgd-grub-devel=m.gmane.org@gnu.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com 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 List-Id: xen-devel@lists.xenproject.org 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; -- 2.5.0