merge merge-mkimage into newreloc

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-03 22:59:30 +02:00
commit f34c08dac5
3 changed files with 9 additions and 8 deletions

View file

@ -342,7 +342,7 @@ else
prefix_drive=`$grub_probe --target=drive --device ${grub_device}` || exit 1
fi
case "${target_cpu}-${platform}"
case "${target_cpu}-${platform}" in
i386-pc) mkimage_target=i386-pc ;;
sparc64-ieee1275) mkimage_target=sparc64-ieee1275-raw ;;
mips-yeeloong) mkimage_target=mipsel-yeeloong-elf ;;

View file

@ -1204,7 +1204,7 @@ Make a bootable image of GRUB.\n\
\n\
Report bugs to <%s>.\n\
"),
program_name, GRUB_LIBDIR, DEFAULT_DIRECTORY,
program_name, GRUB_PKGLIBROOTDIR, DEFAULT_DIRECTORY,
formats,
PACKAGE_BUGREPORT);
free (formats);
@ -1342,14 +1342,15 @@ main (int argc, char *argv[])
last = strchr (last + 1, '-');
if (!last)
last = image_target->name + strlen (image_target->name);
dir = xmalloc (sizeof (GRUB_LIBDIR) + (last - image_target->name));
memcpy (dir, GRUB_LIBDIR, sizeof (GRUB_LIBDIR) - 1);
memcpy (dir + sizeof (GRUB_LIBDIR) - 1, image_target->name,
dir = xmalloc (sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name));
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_LIBDIR) - 1 + (last - image_target->name)) = 0;
*(dir + sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name)) = 0;
}
generate_image (dir ? : GRUB_LIBDIR, prefix ? : DEFAULT_DIRECTORY, fp,
generate_image (dir, prefix ? : DEFAULT_DIRECTORY, fp,
argv + optind, memdisk, font, config,
image_target, note);