* grub-core/kern/main.c (grub_set_prefix_and_root): Strip trailing
platform from firmware path.
This commit is contained in:
parent
0789b67232
commit
be174e5ef3
2 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/main.c (grub_set_prefix_and_root): Strip trailing
|
||||
platform from firmware path.
|
||||
|
||||
2013-02-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Enable linux16 on non-BIOS systems for i.a. memtest.
|
||||
|
|
|
@ -168,7 +168,16 @@ grub_set_prefix_and_root (void)
|
|||
else
|
||||
grub_free (fwdevice);
|
||||
if (fwpath && !path)
|
||||
path = fwpath;
|
||||
{
|
||||
grub_size_t len = grub_strlen (fwpath);
|
||||
while (len > 1 && fwpath[len - 1] == '/')
|
||||
fwpath[--len] = 0;
|
||||
if (len >= sizeof (GRUB_TARGET_CPU "-" GRUB_PLATFORM) - 1
|
||||
&& grub_memcmp (fwpath + len - (sizeof (GRUB_TARGET_CPU "-" GRUB_PLATFORM) - 1), GRUB_TARGET_CPU "-" GRUB_PLATFORM,
|
||||
sizeof (GRUB_TARGET_CPU "-" GRUB_PLATFORM) - 1) == 0)
|
||||
fwpath[len - (sizeof (GRUB_TARGET_CPU "-" GRUB_PLATFORM) - 1)] = 0;
|
||||
path = fwpath;
|
||||
}
|
||||
else
|
||||
grub_free (fwpath);
|
||||
if (device)
|
||||
|
|
Loading…
Reference in a new issue