* util/grub-setup.c (setup): New parameter allow_floppy.

(arguments): New member allow_floppy.
	(argp_parser): Handle --allow-floppy.
	(main): Pass allow_floppy.
	* util/grub-install.in: New option --allow-floppy passed though to
	grub-setup.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-10-17 00:35:14 +02:00
parent 861dfd4cb2
commit fdf2ec9c8c
3 changed files with 31 additions and 5 deletions

View file

@ -107,6 +107,8 @@ Install GRUB on your drive.
--grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
--grub-probe=FILE use FILE as grub-probe
--no-floppy do not probe any floppy drive
--allow-floppy Make the drive also bootable as floppy
(default for fdX devices). May break on some BIOSes.
--recheck probe a device map even if it already exists
--force install even if problems are detected
EOF
@ -148,6 +150,8 @@ argument () {
echo $1
}
allow_floppy=""
# Check the arguments.
while test $# -gt 0
do
@ -221,6 +225,9 @@ do
--removable)
removable=yes ;;
--allow-floppy)
allow_floppy="--allow-floppy" ;;
--disk-module)
if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
disk_module=`argument $option "$@"`; shift;
@ -576,7 +583,7 @@ fi
# Perform the platform-dependent install
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then
# Now perform the installation.
$grub_setup ${setup_verbose} ${setup_force} --directory=${grubdir} \
$grub_setup ${allow_floppy} ${setup_verbose} ${setup_force} --directory=${grubdir} \
--device-map=${device_map} ${install_device} || exit 1
elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ]; then
if [ x"$update_nvram" = xyes ]; then