All of lore.kernel.org
 help / color / mirror / Atom feed
From: fu.wei@linaro.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, leif.lindholm@linaro.org, julien.grall@arm.com,
	sstabellini@kernel.org, linaro-uefi@lists.linaro.org,
	Fu Wei <fu.wei@linaro.org>
Subject: [PATCH v6 2/4] arm64: add "--nounzip" option support in xen_module command
Date: Tue, 26 Jul 2016 17:13:41 +0800	[thread overview]
Message-ID: <1469524423-7082-3-git-send-email-fu.wei@linaro.org> (raw)
In-Reply-To: <1469524423-7082-1-git-send-email-fu.wei@linaro.org>

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>
 #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;
-- 
2.5.5


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: fu.wei@linaro.org
To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com
Cc: linaro-uefi@lists.linaro.org, Ian.Campbell@citrix.com,
	julien.grall@arm.com, xen-devel@lists.xensource.com,
	jcm@redhat.com, leif.lindholm@linaro.org, sstabellini@kernel.org,
	Fu Wei <fu.wei@linaro.org>
Subject: [PATCH v6 2/4] arm64: add "--nounzip" option support in xen_module command
Date: Tue, 26 Jul 2016 17:13:41 +0800	[thread overview]
Message-ID: <1469524423-7082-3-git-send-email-fu.wei@linaro.org> (raw)
In-Reply-To: <1469524423-7082-1-git-send-email-fu.wei@linaro.org>

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>
 #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;
-- 
2.5.5



  parent reply	other threads:[~2016-07-26  9:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  9:13 [PATCH v6 0/4] arm64,xen: add xen_boot support into grup-mkconfig fu.wei
2016-07-26  9:13 ` fu.wei
2016-07-26  9:13 ` [PATCH v6 1/4] i386, xen: Add xen_hypervisor and xen_module aliases for i386 fu.wei
2016-07-26  9:13   ` fu.wei
2016-11-03 14:37   ` Daniel Kiper
2016-11-03 14:37     ` Daniel Kiper
2016-07-26  9:13 ` fu.wei [this message]
2016-07-26  9:13   ` [PATCH v6 2/4] arm64: add "--nounzip" option support in xen_module command fu.wei
2016-11-03 15:00   ` Daniel Kiper
2016-11-03 15:00     ` Daniel Kiper
2016-07-26  9:13 ` [PATCH v6 3/4] * util/grub.d/20_linux_xen.in: Add xen_boot command support fu.wei
2016-07-26  9:13   ` fu.wei
2016-11-03 15:19   ` Daniel Kiper
2016-11-03 15:19     ` Daniel Kiper
2016-07-26  9:13 ` [PATCH v6 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi fu.wei
2016-07-26  9:13   ` fu.wei
2016-11-03 15:25   ` Daniel Kiper
2016-11-03 15:25     ` Daniel Kiper
2016-09-01 12:47 ` [PATCH v6 0/4] arm64, xen: add xen_boot support into grup-mkconfig Julien Grall
2016-09-01 12:47   ` Julien Grall
2016-09-01 21:51   ` Daniel Kiper
2016-09-01 21:51     ` Daniel Kiper
2016-09-06 10:56     ` [Xen-devel] " Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469524423-7082-3-git-send-email-fu.wei@linaro.org \
    --to=fu.wei@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=jcm@redhat.com \
    --cc=julien.grall@arm.com \
    --cc=leif.lindholm@linaro.org \
    --cc=linaro-uefi@lists.linaro.org \
    --cc=phcoder@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.