mistake in r2156. Noticed by Anthony Fok.
* util/grub.d/10_kfreebsd.in (TEXTDOMAINDIR): Set to lowercased
@localedir@.
* util/grub.d/10_linux.in (TEXTDOMAINDIR): Likewise.
* util/getroot.c (find_root_device): Convert block device to
character device on NetBSD.
* util/probe.c (probe): Require character device on NetBSD.
* util/hostdisk.c: NetBSD specific headers.
(configure_device_driver): new function to tune device driver
parameters (currently only for NetBSD floppy driver).
(grub_util_biosdisk_open): NetBSD specific code (get disk size
via disklabel ioctl).
(open_device): call configure_device_driver on NetBSD.
(convert_system_partition_to_system_disk): NetBSD specific code.
(device_is_wholedisk): Likewise.
(grub_util_biosdisk_get_grub_dev): Likewise.
(make_device_name): Fixed a typo in bsd_part_str.
* configure.ac: check for opendisk() and getrawpartition() on
NetBSD and set LIBUTIL.
* Makefile.in: add LIBUTIL to LIBS.
* include/grub/script_sh.h (grub_script_cmdwhile): New struct.
(grub_script_create_cmdwhile): New function prototype.
(grub_script_execute_cmdwhile): New function prototype.
* script/execute.c (grub_script_execute_cmdwhile): New function.
* script/parser.y (command): New commands.
(whilecmd): New grammar rule.
(untilcmd): New grammar rule.
* script/script.c (grub_script_create_cmdwhile): New function.
* util/grub-script-check.c (grub_script_execute_cmdwhile): New
function.
* tests/grub_script_while1.in: New testcase.
* conf/tests.rmk: Rule for new testcase.
GRUB_DISTRIBUTOR for --class, to avoid problems if somebody puts
spaces in GRUB_DISTRIBUTOR.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
which is the case with --disabled-nls.
* include/grub/i18n.h: Use (defined(ENABLE_NLS)
&& ENABLE_NLS) instead of ENABLE_NLS in all #if preprocessor macros.
* util/misc.c: Likewise.
* util/mkisofs/mkisofs.c: Likewise.
* util/mkisofs/mkisofs.h: Likewise.
* util/hostdisk.c (struct grub_util_biosdisk_data): New structure.
(grub_util_biosdisk_open): Initialise disk->data.
(struct linux_partition_cache): New structure.
(linux_find_partition): Cache partition start positions; these are
expensive to compute on every read and write.
(open_device): Cache open file descriptor in disk->data, so that we
don't have to reopen it and flush the buffer cache for consecutive
operations on the same device.
(grub_util_biosdisk_close): New function.
(grub_util_biosdisk_dev): Set `close' member.
* conf/common.rmk (grub_probe_SOURCES): Add kern/list.c.
* conf/i386-efi.rmk (grub_setup_SOURCES): Likewise.
* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
* conf/sparc64-ieee1275.rmk (grub_setup_SOURCES): Likewise.
* conf/x86_64-efi.rmk (grub_setup_SOURCES): Likewise.
* util/hostdisk.c (struct grub_util_biosdisk_data): New structure.
(grub_util_biosdisk_open): Initialise disk->data.
(struct linux_partition_cache): New structure.
(linux_find_partition): Cache partition start positions; these are
expensive to compute on every read and write.
(open_device): Cache open file descriptor in disk->data, so that we
don't have to reopen it and flush the buffer cache for consecutive
operations on the same device.
(grub_util_biosdisk_close): New function.
(grub_util_biosdisk_dev): Set `close' member.
* conf/common.rmk (grub_probe_SOURCES): Add kern/list.c.
* conf/i386-efi.rmk (grub_setup_SOURCES): Likewise.
* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
* conf/sparc64-ieee1275.rmk (grub_setup_SOURCES): Likewise.
* conf/x86_64-efi.rmk (grub_setup_SOURCES): Likewise.
* util/grub-mkconfig.in (GRUB_SAVEDEFAULT): Export new variable.
* util/grub-mkconfig_lib.in (save_default_entry): Only save a new
default entry if GRUB_SAVEDEFAULT=true. This allows using
GRUB_DEFAULT=saved on its own to let grub-reboot work, without
saving a new default on every boot.
Fix warnings in grub-emu when compiling with maximum warning options.
* util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Rename one instance
of disk to dsk to avoid shadowing.
Fix warnings in grub-emu when compiling with maximum warning options.
* util/grub-emu.c (ENABLE_RELOCATABLE): New definition.
(grub_arch_modules_addr): Return 0 and not NULL.
* util/misc.c (ENABLE_RELOCATABLE): New definition.
(xstrdup): USe newstr instead of dup.
* util/hostdisk.c (open_device): Don't use partition device when reading
before the partition.
(grub_util_biosdisk_read): Don't read from partition and before the
partition in single operation.
(grub_util_biosdisk_write): Don't write to partition and before the
partition in single operation.
* util/grub.d/10_linux.in: This script does not use any of the
contents of gettext.sh, only the external command `gettext', so stop
sourcing it. (Moreover, gettext.sh isn't necessarily installed in
the same prefix as GRUB.)
* util/grub.d/10_kfreebsd.in: Likewise.
* font/font.c: Include `grub/fontformat.h.
Remove font file format constants.
(grub_font_load): Use the new macros.
* include/grub/fontformat.h: New file.
* util/grub-mkfont.c: Include `grub/fontformat.c'.
(write_font_pf2): Use the new macros.
* conf/common.rmk (grub_mkdevicemap_SOURCES): Add kern/env.c,
kern/err.c, kern/list.c, and kern/misc.c.
* util/deviceiter.c [__linux__]: Define MINOR.
(grub_util_iterate_devices): Add support for DM-RAID disk devices.
* util/mkdevicemap.c (grub_putchar): New function.
(grub_getkey): New function.
(grub_refresh): New function.
(main): Set debug=all if -v -v is used.
* configure.ac: Check for Linux device-mapper support.
* util/hostdisk.c (device_is_mapped): New function.
(find_partition_start): New function, partly broken out from
linux_find_partition and grub_util_biosdisk_get_grub_dev but with
device-mapper support added.
(linux_find_partition): Use find_partition_start.
(convert_system_partition_to_system_disk): Add `st' argument.
Support Linux /dev/mapper/* devices if device-mapper support is
available; only DM-RAID devices are understood at present.
(find_system_device): Add `st' argument. Pass it to
convert_system_partition_to_system_disk.
(grub_util_biosdisk_get_grub_dev): Pass stat result to
find_system_device and convert_system_partition_to_system_disk. Use
find_partition_start.
* util/misc.c (make_system_path_relative_to_its_root): Change the work
around for handling "/" to the correct fix. Fix a memory leak. Use
xstrdup instead of strdup.