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

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

No files matched your search

+13 -3
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,