2008-05-30 Robert Millan <rmh@aybabtu.com>
* util/grub.d/00_header.in: Remove obsolete comment referencing convert_system_path_to_grub_path(). * util/update-grub.in: Likewise. * util/update-grub_lib.in (is_path_readable_by_grub): New function. (convert_system_path_to_grub_path): Add a warning message explaining that this function is deprecated. Rely on is_path_readable_by_grub() for the readability checks. (font_path): Use is_path_readable_by_grub() for the readability check rather than convert_system_path_to_grub_path().
This commit is contained in:
parent
972e2f7a66
commit
cab63c95dc
4 changed files with 29 additions and 5 deletions
|
@ -71,11 +71,11 @@ make_system_path_relative_to_its_root ()
|
|||
echo $path | sed -e "s,^$dir,,g"
|
||||
}
|
||||
|
||||
convert_system_path_to_grub_path ()
|
||||
is_path_readable_by_grub ()
|
||||
{
|
||||
path=$1
|
||||
|
||||
# abort if file doesn't exist
|
||||
# abort if path doesn't exist
|
||||
if test -e $path ; then : ;else
|
||||
return 1
|
||||
fi
|
||||
|
@ -85,6 +85,20 @@ convert_system_path_to_grub_path ()
|
|||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
convert_system_path_to_grub_path ()
|
||||
{
|
||||
path=$1
|
||||
|
||||
echo "Warning: convert_system_path_to_grub_path() is deprecated. Use prepare_grub_to_access_device() instead." >&2
|
||||
|
||||
# abort if GRUB can't access the path
|
||||
if is_path_readable_by_grub ${path} ; then : ; else
|
||||
return 1
|
||||
fi
|
||||
|
||||
if drive=`${grub_probe} -t drive $path` ; then : ; else
|
||||
return 1
|
||||
fi
|
||||
|
@ -120,7 +134,7 @@ font_path ()
|
|||
# Prefer complete fonts over incomplete ones.
|
||||
for basename in unicode unifont ascii ; do
|
||||
path="${dir}/${basename}.pff"
|
||||
if convert_system_path_to_grub_path ${path} > /dev/null ; then
|
||||
if is_path_readable_by_grub ${path} > /dev/null ; then
|
||||
echo "${path}"
|
||||
return 0
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue