r5499 - in glibc-package/branches/eglibc-2.17/debian: . patches patches/hurd-i386
Author: sthibault
Date: 2013-02-26 01:38:43 +0000 (Tue, 26 Feb 2013)
New Revision: 5499
Added:
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-remap_getcwd.diff
Modified:
glibc-package/branches/eglibc-2.17/debian/changelog
glibc-package/branches/eglibc-2.17/debian/patches/series
Log:
patches/hurd-i386/tg-remap_getcwd.diff: New patch, fixes remap translator.
Modified: glibc-package/branches/eglibc-2.17/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/changelog 2013-02-24 18:17:19 UTC (rev 5498)
+++ glibc-package/branches/eglibc-2.17/debian/changelog 2013-02-26 01:38:43 UTC (rev 5499)
@@ -11,6 +11,7 @@
getifaddrs.
* patches/hurd-i386/unsubmitted-subhurd.diff: New patch, fixes sub-hurd
boot.
+ * patches/hurd-i386/tg-remap_getcwd.diff: New patch, fixes remap translator.
[ Adam Conrad ]
* debian/debhelper.in/libc.postint: Switch from 'awk gsub' to 'tr -d'
Added: glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-remap_getcwd.diff
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-remap_getcwd.diff (rev 0)
+++ glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-remap_getcwd.diff 2013-02-26 01:38:43 UTC (rev 5499)
@@ -0,0 +1,50 @@
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Subject: [PATCH] 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>
+
+---
+ sysdeps/mach/hurd/getcwd.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/sysdeps/mach/hurd/getcwd.c b/sysdeps/mach/hurd/getcwd.c
+index e4cea5c..fdbcaf8 100644
+--- a/sysdeps/mach/hurd/getcwd.c
++++ b/sysdeps/mach/hurd/getcwd.c
+@@ -267,11 +267,6 @@ _hurd_canonicalize_directory_name_internal (file_t thisdir,
+ So the root is our current directory. */
+ *--file_namep = '/';
+
+- if (thisid != rootid)
+- /* We did not get to our root directory. The returned name should
+- not begin with a slash. */
+- ++file_namep;
+-
+ memmove (file_name, file_namep, file_name + size - file_namep);
+ cleanup ();
+ return file_name;
+@@ -311,13 +306,6 @@ __getcwd (char *buf, size_t size)
+ __USEPORT (CWDIR,
+ _hurd_canonicalize_directory_name_internal (port,
+ buf, size));
+- if (cwd && cwd[0] != '/')
+- {
+- /* `cwd' is an unknown root directory. */
+- if (buf == NULL)
+- free (cwd);
+- return __hurd_fail (EGRATUITOUS), NULL;
+- }
+ return cwd;
+ }
+ weak_alias (__getcwd, getcwd)
+--
+tg: (4a7fa7e..) t/remap_getcwd (depends on: baseline)
Modified: glibc-package/branches/eglibc-2.17/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/series 2013-02-24 18:17:19 UTC (rev 5498)
+++ glibc-package/branches/eglibc-2.17/debian/patches/series 2013-02-26 01:38:43 UTC (rev 5499)
@@ -117,6 +117,7 @@
hurd-i386/libpthread_hurd_cond_timedwait.diff
hurd-i386/tg-ifaddrs_v6.diff
hurd-i386/unsubmitted-subhurd.diff
+hurd-i386/tg-remap_getcwd.diff
i386/local-biarch.diff
i386/local-cmov.diff
Reply to: