summaryrefslogtreecommitdiff
path: root/libnetfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-03-12 20:40:07 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-03-12 20:40:07 +0000
commitf63268b6ed22b592ab5bc6dd5a39046f625080bf (patch)
tree4b18313ec8d76c034746bad31d7e7cb2e5da57e6 /libnetfs
parent6adeef7edcf612da925d49fd574c6fe90c436b6b (diff)
Formerly fsys-getroot.c.~4~
Diffstat (limited to 'libnetfs')
-rw-r--r--libnetfs/fsys-getroot.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libnetfs/fsys-getroot.c b/libnetfs/fsys-getroot.c
index cc551928..346c3622 100644
--- a/libnetfs/fsys-getroot.c
+++ b/libnetfs/fsys-getroot.c
@@ -55,6 +55,27 @@ netfs_S_fsys_getroot (mach_port_t cntl,
goto out;
type = netfs_root_node->nn_stat.st_mode & S_IFMT;
+
+ if ((netfs_root_node->istranslated
+ || fshelp_translated (&netfs_root_node->transbox))
+ && !(flags & O_NOTRANS))
+ {
+ err = fshelp_fetch_root (&netfs_root_node->transbox,
+ &dotdot, dotdot, uids, nuids,
+ gids, ngids, flags,
+ _netfs_translator_callback1,
+ _netfs_translator_callback2,
+ do_retry, retry_name, retry_port);
+ if (err != ENOENT)
+ {
+ mutex_unlock (&netfs_root_node->lock);
+ if (!err)
+ *retry_port_type = MACH_MSG_TYPE_MOVE_SEND;
+ return err;
+ }
+ /* ENOENT means translator has vanished inside fshelp_fetch_root. */
+ err = 0;
+ }
if (type == S_IFLNK && !(flags & (O_NOLINK | O_NOTRANS)))
{