* 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.
* conf/common.rmk (grub_mkdevicemap_SOURCES): Add kern/env.c,
kern/err.c, kern/list.c, kern/misc.c, and kern/emu/mm.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.
* 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.
* 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.