mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 15:49:23 +00:00
fix a bogus bug in kernel_func, load initrd below 1GB, append mem= option only if >64MB, add some CDROM detection code, don't use the last page for initrd to avoid a Linux's bug.
This commit is contained in:
1 parent
ba86939fcb
commit
4d452e493f
4 files changed
+64
-14
No files matched your search
+7
-7
@@ -1832,23 +1832,23 @@ kernel_func (char *arg, int flags)
|
||||
|
||||
/* If the option `--type=TYPE' is specified, convert the string to
|
||||
a kernel type. */
|
||||
if (grub_memcmp (arg, "--type=") == 0)
|
||||
if (grub_memcmp (arg, "--type=", 7) == 0)
|
||||
{
|
||||
arg += 7;
|
||||
|
||||
if (grub_memcmp (arg, "netbsd") == 0)
|
||||
if (grub_memcmp (arg, "netbsd", 6) == 0)
|
||||
suggested_type = KERNEL_TYPE_NETBSD;
|
||||
else if (grub_memcmp (arg, "freebsd") == 0)
|
||||
else if (grub_memcmp (arg, "freebsd", 7) == 0)
|
||||
suggested_type = KERNEL_TYPE_FREEBSD;
|
||||
else if (grub_memcmp (arg, "openbsd") == 0)
|
||||
else if (grub_memcmp (arg, "openbsd", 7) == 0)
|
||||
/* XXX: For now, OpenBSD is identical to NetBSD, from GRUB's
|
||||
point of view. */
|
||||
suggested_type = KERNEL_TYPE_NETBSD;
|
||||
else if (grub_memcmp (arg, "linux") == 0)
|
||||
else if (grub_memcmp (arg, "linux", 5) == 0)
|
||||
suggested_type = KERNEL_TYPE_LINUX;
|
||||
else if (grub_memcmp (arg, "biglinux") == 0)
|
||||
else if (grub_memcmp (arg, "biglinux", 8) == 0)
|
||||
suggested_type = KERNEL_TYPE_BIG_LINUX;
|
||||
else if (grub_memcmp (arg, "multiboot") == 0)
|
||||
else if (grub_memcmp (arg, "multiboot", 9) == 0)
|
||||
suggested_type = KERNEL_TYPE_MULTIBOOT;
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user