# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
				
set hotkey="_"
echo ${scanpartmsg}
for dev in (*); do
	regexp -s device '\((.*)\)' $dev
	probe -f -s fstype $device
	
	if [ -z "$fstype" ] -o [ "$fstype" == "procfs" ] -o [ "$fstype" == "pyfs" ]; then continue; fi
	
	if [ -n "$fs_args" ]; then
		set _ok="0"
		for _fs in $fs_args; do
			if [ "$fstype" == "$_fs" ]; then set _ok="1"; break; fi
		done
		if [ "$_ok" == "0" ]; then continue; fi
	fi
	if [ -n "$ignore_fs_args" ]; then
		set _ok="1"
		for _ignore_fs in $ignore_fs_args; do
			if [ "$fstype" == "$_ignore_fs" ]; then set _ok="0"; break; fi
		done
		if [ "$_ok" == "0" ]; then continue; fi
	fi
	
	probe -s vollabel -l $device
	probe -s voluuid -u $device
	if [ -z "$vollabel" ]; then set vollabel="${noname}"; fi
	GetHotkey
	submenu "${device} - ${vollabel} - ${fstype} - ${voluuid}" $device --hotkey="${hotkey}" {
		FileManager "(${2})"
	}
	unset vollabel
	unset voluuid
	unset fstype
done
ReturnMainMenu;
