grub/include/grub/osdep
Peter Jones 03e72830ab grub-editenv: Add grub_util_readlink()
Currently grub-editenv and related tools are not able to follow symbolic
links when finding their config file. For example the grub-editenv create
command will wrongly overwrite a symlink in /boot/grub2/grubenv with a new
regular file, instead of creating a file in the path the symlink points to.

A following patch will change that and add support in grub-editenv to
follow symbolic links when finding the grub environment variables file.

Add a grub_util_readlink() helper function that is just a wrapper around
the platform specific function to read the value of a symbolic link. This
helper function will be used by the following patch for grub-editenv.

The helper function is not added for Windows, since this operating system
doesn't have a primitive to read the contents of a symbolic link.

Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-02-18 15:14:13 +01:00
..
hostfile.h Move OS-dependent file definitions to include/grub/osdep/hostfile*.h. 2013-10-09 08:20:20 +02:00
hostfile_aros.h grub-editenv: Add grub_util_readlink() 2020-02-18 15:14:13 +01:00
hostfile_unix.h grub-editenv: Add grub_util_readlink() 2020-02-18 15:14:13 +01:00
hostfile_windows.h Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS 2014-01-18 20:04:11 +04:00