* util/grub-mkimage.c (main): Handle special naming of yeeloong

directory.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-04-08 16:00:23 +02:00
parent 2c58372857
commit 1ec652f4c4
2 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2011-04-08 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkimage.c (main): Handle special naming of yeeloong
directory.
2011-04-08 Colin Watson <cjwatson@ubuntu.com>
* docs/grub-dev.texi: Fix spelling of "developer" throughout.

View file

@ -1588,9 +1588,19 @@ main (int argc, char *argv[])
+ 1);
memcpy (dir, GRUB_PKGLIBROOTDIR, sizeof (GRUB_PKGLIBROOTDIR) - 1);
*(dir + sizeof (GRUB_PKGLIBROOTDIR) - 1) = '/';
memcpy (dir + sizeof (GRUB_PKGLIBROOTDIR), image_target->name,
last - image_target->name);
*(dir + sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name)) = 0;
if (strncmp (image_target->name, "mipsel-yeeloong",
last - image_target->name) == 0)
{
memcpy (dir + sizeof (GRUB_PKGLIBROOTDIR), "mips-yeeloong",
sizeof ("mips-yeeloong"));
}
else
{
memcpy (dir + sizeof (GRUB_PKGLIBROOTDIR), image_target->name,
last - image_target->name);
*(dir + sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name))
= 0;
}
}
generate_image (dir, prefix ? : DEFAULT_DIRECTORY, fp,