Allow unknown root directory.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 8 Sep 2019 20:34:02 +0000 (21:34 +0100)
committerAurelien Jarno <aurel32@debian.org>
Sun, 8 Sep 2019 20:34:02 +0000 (21:34 +0100)
commit1ebf1efe8c5aac97582d40d3dad29939053be0d4
tree4089f63a3e487d82fc057bddd236112de4865612
parent5def0ae24bf21463d52fad1c4cc71e300d0fd78b
Allow unknown root directory.

To be efficient, the remap translator simply returns ports from the underlying
filesystem, and thus the root directory found through browsing '..' is the
underlying root, not the remap root. This should not be a reason for getcwd to
fail.

* sysdeps/mach/hurd/getcwd.c (_hurd_canonicalize_directory_name_internal): Do
not remove the heading slash if we got an unknown root directory.
(__getcwd): Do not fail with EGRATUITOUS if we got an unknown root directory.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-remap_getcwd.diff
sysdeps/mach/hurd/getcwd.c