summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-02-13 09:19:17 +0000
committerThomas Bushnell <thomas@gnu.org>1999-02-13 09:19:17 +0000
commitdbe1211d027346c1e61a7befdb930ae64758329e (patch)
tree99e7553acbddabc3c617d68ee250deb08699eb54 /libdiskfs
parentc8d2da69861cf22e740b26d81e326d1e02835d56 (diff)
1999-02-12 Gordon Matzigkeit <gord@trick.fig.org>
* init-startup.c (diskfs_startup_diskfs): Release the virtual root's lock as soon as we've checked that it's a valid directory. Ignore leading slashes in _diskfs_chroot_directory.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/ChangeLog6
-rw-r--r--libdiskfs/init-startup.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog
index 3fd85ff9..f1c1a716 100644
--- a/libdiskfs/ChangeLog
+++ b/libdiskfs/ChangeLog
@@ -1,3 +1,9 @@
+1999-02-12 Gordon Matzigkeit <gord@trick.fig.org>
+
+ * init-startup.c (diskfs_startup_diskfs): Release the virtual
+ root's lock as soon as we've checked that it's a valid directory.
+ Ignore leading slashes in _diskfs_chroot_directory.
+
Sun Jan 31 18:24:33 1999 Thomas Bushnell, BSG <tb@mit.edu>
* file-utimes.c (diskfs_S_file_utimes): Implement new semantics
diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c
index ea77283c..355a66ae 100644
--- a/libdiskfs/init-startup.c
+++ b/libdiskfs/init-startup.c
@@ -1,5 +1,5 @@
/* diskfs_startup_diskfs -- advertise our fsys control port to our parent FS.
- Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation
+ Copyright (C) 1994, 1995, 1996, 1998, 1999 Free Software Foundation
This file is part of the GNU Hurd.
@@ -43,6 +43,10 @@ diskfs_startup_diskfs (mach_port_t bootstrap, int flags)
struct node *np, *old;
struct protid *rootpi;
+ /* Skip leading slashes */
+ while (_diskfs_chroot_directory == '/')
+ _diskfs_chroot_directory++;
+
mutex_lock (&diskfs_root_node->lock);
/* Create a protid we can use in diskfs_lookup. */
@@ -75,6 +79,7 @@ diskfs_startup_diskfs (mach_port_t bootstrap, int flags)
if _diskfs_chroot_directory is non-null. */
old = diskfs_root_node;
diskfs_root_node = np;
+ mutex_unlock (&np->lock);
diskfs_nput (old);
}