diff --git a/ChangeLog b/ChangeLog index 742a8cec2..76526f4ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-08-20 Szymon Janc + + 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 * grub-core/loader/i386/linux.c (grub_linux_setup_video): Add diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 972d462da..ad64701a2 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -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) {