Message ID | 1469524423-7082-3-git-send-email-fu.wei@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Jul 26, 2016 at 05:13:41PM +0800, fu.wei@linaro.org wrote: > From: Fu Wei <fu.wei@linaro.org> > > 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 <fu.wei@linaro.org> > --- > 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 <grub/charset.h> > #include <grub/command.h> > #include <grub/err.h> > +#include <grub/env.h> Is it really needed? Daniel
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 <grub/charset.h> #include <grub/command.h> #include <grub/err.h> +#include <grub/env.h> #include <grub/file.h> #include <grub/fdt.h> #include <grub/list.h> @@ -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;