diff options
author | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2009-07-05 15:26:58 +0300 |
---|---|---|
committer | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2009-12-10 21:32:45 +0000 |
commit | 4db02de530ceb22a814ab6f53eda77c40de03fe7 (patch) | |
tree | 759b4287eaa92b2d63c4895f5c7209b184bb3ce4 /mount.c | |
parent | d711d1eb2ac42911690a107f80e7fb5df09a4782 (diff) |
Add the mountee to the list of merged filesystems.unionmount
* mount.c (start_mountee): Add the mountee's filesystem to the
list of merged filesystems.
* node.c (node_init_root): Take into consideration the fact that
an empty string refers to the mountee root.
* ulfs.c (ulfs_check): Likewise.
(ulfs_register): Don't check whether "" is a valid directory.
Diffstat (limited to 'mount.c')
-rw-r--r-- | mount.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -27,6 +27,7 @@ #include "mount.h" #include "lib.h" +#include "ulfs.h" /* The command line for starting the mountee. */ char * mountee_argz; @@ -144,7 +145,9 @@ start_mountee (node_t * np, char * argz, size_t argz_len, mach_port_t * port) return err; } /* start_mountee */ -/* Sets up a proxy node and sets the translator on it. */ +/* Sets up a proxy node, sets the translator on it, and registers the + filesystem published by the translator in the list of merged + filesystems. */ error_t setup_unionmount (void) { @@ -166,6 +169,15 @@ setup_unionmount (void) if (err) return err; + /* A path equal to "" will mean that the current ULFS entry is the + mountee port. */ + ulfs_register ("", 0, 0); + + /* Reinitialize the list of merged filesystems to take into account + the newly added mountee's filesystem. */ + ulfs_check (); + node_init_root (netfs_root_node); + mountee_started = 1; return 0; |