]> git.ipfire.org Git - thirdparty/grub.git/commit
getroot: Save/restore CWD more reliably on Unix
authorColin Watson <cjwatson@ubuntu.com>
Sat, 9 Mar 2019 14:37:17 +0000 (14:37 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 19 Mar 2019 10:23:22 +0000 (11:23 +0100)
commit5dfa0afa169f915471d4d55f519a6f3b830e37ae
treec01d5803dd14deeca7b868ab61b9f5bbcd719b47
parent5bc41db756c5b342aa22fc95508bde105e05a095
getroot: Save/restore CWD more reliably on Unix

Various GRUB utilities fail if the current directory doesn't exist,
because grub_find_device() chdirs to a different directory and then
fails when trying to chdir back.  Gnulib's save-cwd module uses fchdir()
instead when it can, avoiding this category of problem.

Fixes Debian bug #918700.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
bootstrap.conf
grub-core/osdep/unix/getroot.c