Allow unknown root directory.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
commite54b5dda48e4334d4e60ea677e853962fd4ecf5c
treeeb41d268c44d5d2ddf9dee0518fe6977228c99cf
parentb3b811d93a69d4d1734bc861356684eb185e723f
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