summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-11-02 22:52:22 +0000
committerMiles Bader <miles@gnu.org>1995-11-02 22:52:22 +0000
commitf8d2eb0316d448bd5ada775ff0b27f628501026d (patch)
treea5ea690f7a73866ca34966f68a1e57a0180a2a1a /libdiskfs
parentcf5ac2064f6a06ff14d53e9f6b856cf03d247936 (diff)
(diskfs_S_dir_lookup): Add new callback arg to fshelp_fetch_root call.
Change short_circuited_callback1 to reflect the split into two callbacks (we use the global diskfs callback for the other).
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/dir-lookup.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 7e48df60..855de6a2 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -183,17 +183,13 @@ diskfs_S_dir_lookup (struct protid *dircred,
{
mach_port_t dirport;
- /* A call backup function for short-circuited translators.
+ /* A callback function for short-circuited translators.
Symlink & ifsock are handled elsewhere. */
- error_t short_circuited_callback (void *cookie1, void *cookie2,
- mach_port_t *underlying,
- uid_t *uid, gid_t *gid,
- char **argz, int *argz_len)
+ error_t short_circuited_callback1 (void *cookie1, void *cookie2,
+ uid_t *uid, gid_t *gid,
+ char **argz, int *argz_len)
{
struct node *node = cookie1;
- mach_port_t *dotdot = cookie2;
- error_t err = 0;
- struct protid *newpi;
switch (node->dn_stat.st_mode & S_IFMT)
{
@@ -218,24 +214,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
*uid = node->dn_stat.st_uid;
*gid = node->dn_stat.st_gid;
-
- newpi =
- diskfs_make_protid (diskfs_make_peropen (node,
- (O_READ|O_EXEC
-/* For now, don't give translators write access to their underlying node.
- The fsys_startup interface will soon make this irrelevant anyway. */
-#ifdef XXX
- | (!diskfs_readonly
- ? O_WRITE : 0)
-#endif
- ),
- *dotdot),
- uid, 1, gid, 1);
-
- *underlying = ports_get_right (newpi);
- mach_port_insert_right (mach_task_self (), *underlying,
- *underlying, MACH_MSG_TYPE_MAKE_SEND);
- ports_port_deref (newpi);
+
return 0;
}
@@ -257,8 +236,9 @@ diskfs_S_dir_lookup (struct protid *dircred,
dircred->gids, dircred->ngids,
lastcomp ? flags : 0,
(node->istranslated
- ? _diskfs_translator_callback
- : short_circuited_callback),
+ ? _diskfs_translator_callback1
+ : short_circuited_callback1),
+ _diskfs_translator_callback2,
retry, retryname, returned_port);
if (error != ENOENT)