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
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
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().
|
||||||
|
|
||||||
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
* util/update-grub_lib.in (prepare_grub_to_access_device): New function.
|
* util/update-grub_lib.in (prepare_grub_to_access_device): New function.
|
||||||
|
|
|
@ -21,7 +21,6 @@ exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
platform=@platform@
|
platform=@platform@
|
||||||
|
|
||||||
# for convert_system_path_to_grub_path()
|
|
||||||
. ${libdir}/grub/update-grub_lib
|
. ${libdir}/grub/update-grub_lib
|
||||||
|
|
||||||
# Do this as early as possible, since other commands might depend on it.
|
# Do this as early as possible, since other commands might depend on it.
|
||||||
|
|
|
@ -66,7 +66,6 @@ for option in "$@"; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# for convert_system_path_to_grub_path(), font_path()
|
|
||||||
. ${libdir}/grub/update-grub_lib
|
. ${libdir}/grub/update-grub_lib
|
||||||
|
|
||||||
if [ "x$UID" = "x" ] ; then
|
if [ "x$UID" = "x" ] ; then
|
||||||
|
|
|
@ -71,11 +71,11 @@ make_system_path_relative_to_its_root ()
|
||||||
echo $path | sed -e "s,^$dir,,g"
|
echo $path | sed -e "s,^$dir,,g"
|
||||||
}
|
}
|
||||||
|
|
||||||
convert_system_path_to_grub_path ()
|
is_path_readable_by_grub ()
|
||||||
{
|
{
|
||||||
path=$1
|
path=$1
|
||||||
|
|
||||||
# abort if file doesn't exist
|
# abort if path doesn't exist
|
||||||
if test -e $path ; then : ;else
|
if test -e $path ; then : ;else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -85,6 +85,20 @@ convert_system_path_to_grub_path ()
|
||||||
return 1
|
return 1
|
||||||
fi
|
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
|
if drive=`${grub_probe} -t drive $path` ; then : ; else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -120,7 +134,7 @@ font_path ()
|
||||||
# Prefer complete fonts over incomplete ones.
|
# Prefer complete fonts over incomplete ones.
|
||||||
for basename in unicode unifont ascii ; do
|
for basename in unicode unifont ascii ; do
|
||||||
path="${dir}/${basename}.pff"
|
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}"
|
echo "${path}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue