Allow unknown root directory.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 31 Oct 2019 22:31:12 +0000 (22:31 +0000)
committerSamuel Thibault <sthibault@debian.org>
Thu, 31 Oct 2019 22:31:12 +0000 (22:31 +0000)
commit8cc527ffe71fd5e489b1de7687297556a01e7f6e
treec2bd3d8004505085db359285c21d5a8213a8b76e
parent17d3d07e99a358c11ea7607e5e0e8c8d504c668b
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