2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>

* stage2/boot.c (load_image): For Linux, don't check if the
	length of protected mode code is greater than or equal to the
	expected length minus 16. Instead, just check if no error
	occurred. That was problematic, because memdisk has no protected
	mode code. Also, I don't see what the magic number 16 was for.
This commit is contained in:
okuji 2002-04-29 18:52:16 +00:00
parent bd9abb21c5
commit 6d4bf545d3
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/boot.c (load_image): For Linux, don't check if the
length of protected mode code is greater than or equal to the
expected length minus 16. Instead, just check if no error
occurred. That was problematic, because memdisk has no protected
mode code. Also, I don't see what the magic number 16 was for.
2002-04-29 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c [SUPPORT_SERIAL] (terminal_func): Added a

View file

@ -399,8 +399,9 @@ load_image (char *kernel, char *arg, kernel_t suggested_type,
grub_seek (data_len + SECTOR_SIZE);
cur_addr = LINUX_STAGING_AREA + text_len;
if (grub_read ((char *) LINUX_STAGING_AREA, text_len)
>= (text_len - 16))
grub_read ((char *) LINUX_STAGING_AREA, text_len);
if (errnum == ERR_NONE)
{
grub_close ();
@ -418,8 +419,8 @@ load_image (char *kernel, char *arg, kernel_t suggested_type,
return big_linux ? KERNEL_TYPE_BIG_LINUX : KERNEL_TYPE_LINUX;
}
else if (! errnum)
errnum = ERR_EXEC_FORMAT;
grub_close ();
}
else
errnum = ERR_WONT_FIT;