Allow unknown root directory.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 25 Nov 2016 22:09:39 +0000 (22:09 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 25 Nov 2016 22:09:39 +0000 (22:09 +0000)
commit36fa1c2fbdb8ef7360c439550a54167322d940d6
tree6a41179655554a7e6b9c2be12a7ba4a2f700757c
parentada5c4669c3ae26c471708b3e8bcef4afd146fc4
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