]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* loader/multiboot.c (grub_cmd_module): Don't unzip module if
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 20 Aug 2010 22:57:12 +0000 (00:57 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 20 Aug 2010 22:57:12 +0000 (00:57 +0200)
--nounzip is passed.

ChangeLog
loader/multiboot.c

index e840254ecb3659ef04f48a1a7b8e2bc9a1030f12..71a62267ba6b0017d8059b2204f5873ea2f768ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-21  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * loader/multiboot.c (grub_cmd_module): Don't unzip module if
+       --nounzip is passed.
+
 2010-08-20  Vladimir Serbinenko  <phcoder@gmail.com>
 
        USB hotunplugging and USB serial support.
index 77a732838c6c3d7fc30fa6379dc230c539d3726b..b4ea8bf2104af6b4807ce19bffec5ea9ef431f5a 100644 (file)
@@ -295,6 +295,17 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),
   grub_ssize_t size;
   char *module = 0;
   grub_err_t err;
+  int nounzip = 0;
+
+  if (argc == 0)
+    return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
+
+  if (grub_strcmp (argv[0], "--nounzip") == 0)
+    {
+      argv++;
+      argc--;
+      nounzip = 1;
+    }
 
   if (argc == 0)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
@@ -303,7 +314,10 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),
     return grub_error (GRUB_ERR_BAD_ARGUMENT,
                       "you need to load the multiboot kernel first");
 
-  file = grub_gzfile_open (argv[0], 1);
+  if (nounzip)
+    file = grub_file_open (argv[0]);
+  else
+    file = grub_gzfile_open (argv[0], 1);
   if (! file)
     return grub_errno;