]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Add grub-fstest option to uncompress data for commands.
authorSzymon Janc <szymon@janc.net.pl>
Sat, 20 Aug 2011 11:04:38 +0000 (13:04 +0200)
committerSzymon Janc <szymon@janc.net.pl>
Sat, 20 Aug 2011 11:04:38 +0000 (13:04 +0200)
* util/grub-fstest.c (uncompress): New var.
(options): New option -u.

ChangeLog
util/grub-fstest.c

index 742a8cec2cba6383f918a5ebb0a7495fa02bcb47..76526f4ecfc7abe785a4a929831ec1d0a3258516 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-20  Szymon Janc <szymon@janc.net.pl>
+
+       Add grub-fstest option to uncompress data for commands.
+
+       * util/grub-fstest.c (uncompress): New var.
+       (options): New option -u.
+
 2011-08-20  Szymon Janc <szymon@janc.net.pl>
 
        * grub-core/loader/i386/linux.c (grub_linux_setup_video): Add
index 972d462da3c99dfc6ea0cf4c8c60cf4e1fc9e07e..ad64701a2d3ca375f4365d2485af0d8d7c862647 100644 (file)
@@ -68,6 +68,7 @@ enum {
 #define BUF_SIZE  32256
 
 static grub_disk_addr_t skip, leng;
+static int uncompress = 0;
 
 static void
 read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len))
@@ -111,7 +112,8 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len))
       return;
     }
 
-  grub_file_filter_disable_compression ();
+  if (uncompress == 0)
+    grub_file_filter_disable_compression ();
   file = grub_file_open (pathname);
   if (!file)
     {
@@ -409,6 +411,7 @@ static struct argp_option options[] = {
   {"debug",     'd', "S",           0, N_("Set debug environment variable."),  2},
   {"crypto",   'C', NULL, OPTION_ARG_OPTIONAL, N_("Mount crypto devices."), 2},
   {"verbose",   'v', NULL, OPTION_ARG_OPTIONAL, N_("Print verbose messages."), 2},
+  {"uncompress", 'u', NULL, OPTION_ARG_OPTIONAL, N_("Uncompress data."), 2},
   {0, 0, 0, 0, 0, 0}
 };
 
@@ -469,6 +472,10 @@ argp_parser (int key, char *arg, struct argp_state *state)
       verbosity++;
       return 0;
 
+    case 'u':
+      uncompress = 1;
+      return 0;
+
     case ARGP_KEY_END:
       if (args_count < num_disks)
        {