Don't decompress an initrd automatically.

This commit is contained in:
okuji 2001-07-05 10:52:59 +00:00
parent 60415d246c
commit f2ca2f3ea2
2 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2001-07-05 OKUJI Yoshinori <okuji@gnu.org>
* stage2/boot.c (load_initrd) [!NO_DECOMPRESSION]: Set
NO_DECOMPRESSION to one before opening INITRD, so that GRUB
doesn't decompress an initrd automatically. Reported by
Thierry Laronde.
2001-07-04 OKUJI Yoshinori <okuji@gnu.org> 2001-07-04 OKUJI Yoshinori <okuji@gnu.org>
* config.guess: Updated from automake-1.4h. * config.guess: Updated from automake-1.4h.

View file

@ -707,14 +707,18 @@ load_initrd (char *initrd)
unsigned long moveto; unsigned long moveto;
struct linux_kernel_header *lh; struct linux_kernel_header *lh;
#ifndef NO_DECOMPRESSION
no_decompression = 1;
#endif
if (! grub_open (initrd)) if (! grub_open (initrd))
return 0; goto fail;
len = grub_read ((char *) cur_addr, -1); len = grub_read ((char *) cur_addr, -1);
if (! len) if (! len)
{ {
grub_close (); grub_close ();
return 0; goto fail;
} }
moveto = ((mbi.mem_upper + 0x400) * 0x400 - len) & 0xfffff000; moveto = ((mbi.mem_upper + 0x400) * 0x400 - len) & 0xfffff000;
@ -736,7 +740,14 @@ load_initrd (char *initrd)
lh->ramdisk_size = len; lh->ramdisk_size = len;
grub_close (); grub_close ();
return 1;
fail:
#ifndef NO_DECOMPRESSION
no_decompression = 0;
#endif
return ! errnum;
} }