Don't decompress an initrd automatically.
This commit is contained in:
parent
60415d246c
commit
f2ca2f3ea2
2 changed files with 21 additions and 3 deletions
|
@ -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>
|
||||
|
||||
* config.guess: Updated from automake-1.4h.
|
||||
|
|
|
@ -707,14 +707,18 @@ load_initrd (char *initrd)
|
|||
unsigned long moveto;
|
||||
struct linux_kernel_header *lh;
|
||||
|
||||
#ifndef NO_DECOMPRESSION
|
||||
no_decompression = 1;
|
||||
#endif
|
||||
|
||||
if (! grub_open (initrd))
|
||||
return 0;
|
||||
goto fail;
|
||||
|
||||
len = grub_read ((char *) cur_addr, -1);
|
||||
if (! len)
|
||||
{
|
||||
grub_close ();
|
||||
return 0;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
moveto = ((mbi.mem_upper + 0x400) * 0x400 - len) & 0xfffff000;
|
||||
|
@ -736,7 +740,14 @@ load_initrd (char *initrd)
|
|||
lh->ramdisk_size = len;
|
||||
|
||||
grub_close ();
|
||||
return 1;
|
||||
|
||||
fail:
|
||||
|
||||
#ifndef NO_DECOMPRESSION
|
||||
no_decompression = 0;
|
||||
#endif
|
||||
|
||||
return ! errnum;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue