aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-05-19 00:42:35 +0000
committerChristopher Faylor <me@cgf.cx>2009-05-19 00:42:35 +0000
commit6b4d6adebd0914b3930950982f3479c33cb7978d (patch)
tree62f7ad0bf30b7a20f8cb2e2001a6e4ffb4f33d74
parent1a7613f0b82be784850b463624686e8dded3b357 (diff)
downloadnewlib-6b4d6adebd0914b3930950982f3479c33cb7978d.zip
newlib-6b4d6adebd0914b3930950982f3479c33cb7978d.tar.gz
newlib-6b4d6adebd0914b3930950982f3479c33cb7978d.tar.bz2
* mount.cc (mount_info::add_item): Avoid using any-old '/' as indicating root.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/mount.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7c1dfc9..db158ea 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
+ * mount.cc (mount_info::add_item): Avoid using any-old '/' as
+ indicating root.
+
+2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
+
* mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
(mount_info::got_usr_lib): Ditto.
(mount_info::root_idx): Ditto.
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index f6e4bac..7c7f58a 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -1301,7 +1301,7 @@ mount_info::add_item (const char *native, const char *posix,
if (strcmp (posixtmp, "/usr/lib") == 0)
got_usr_lib = true;
- if (posixtmp[0] == '/' && posixtmp[1] == '\0')
+ if (posixtmp[0] == '/' && posixtmp[1] == '\0' && !(mountflags & MOUNT_CYGDRIVE))
root_idx = i;
mount[i].init (nativetmp, posixtmp, mountflags);