summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-02-06 08:23:56 +0000
committerMiles Bader <miles@gnu.org>1997-02-06 08:23:56 +0000
commit54751cc0172b858189a19b0a607b1a29c1715043 (patch)
tree6f9333a795e07710d2277dac589a8f21d166347b /libdiskfs
parent38ea3b7bc8c774f1e8c89bba9f814d60de95372d (diff)
(diskfs_lookup):
Add DEPTH & NEW_DEPTH arguments. (diskfs_make_peropen): Add DEPTH argument. (struct peropen): Add DEPTH field.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/diskfs.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index c80f8a28..f62ca32d 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -1,5 +1,5 @@
/* Definitions for fileserver helper functions
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -54,8 +54,13 @@ struct peropen
int lock_status;
int refcnt;
int openstat;
- mach_port_t dotdotport; /* dotdot from ROOT through this peropen */
+
struct node *np;
+
+ mach_port_t dotdotport; /* dotdot from ROOT through this peropen */
+ unsigned depth; /* How many levels there are between
+ DOTDOTPORT and us; if DEPTH == 0,
+ DOTDOTPORT is our parent. */
};
/* A unique one of these exists for each node currently in use (and
@@ -780,6 +785,10 @@ struct node *diskfs_make_node (struct disknode *dn);
locked, so don't lock it or add a reference to it.
(SPEC_DOTDOT will not be given with CREATE.)
+ DEPTH is the number of nodes between DP and the filesystem root.
+ If NEW_DEPTH is non-zero, then for a non-error return, the depth of the
+ resulting node NP is returned in it.
+
Return ENOTDIR if DP is not a directory.
Return EACCES if CRED isn't allowed to search DP.
Return EACCES if completing the operation will require writing
@@ -792,7 +801,8 @@ struct node *diskfs_make_node (struct disknode *dn);
*/
error_t diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
struct node **np, struct dirstat *ds,
- struct protid *cred);
+ struct protid *cred,
+ unsigned depth, unsigned *new_depth);
/* Add NP to directory DP under the name NAME. This will only be
called after an unsuccessful call to diskfs_lookup of type CREATE
@@ -856,7 +866,7 @@ void diskfs_finish_protid (struct protid *cred, struct iouser *user);
/* Create and return a new peropen structure on node NP with open
flags FLAGS. */
struct peropen *diskfs_make_peropen (struct node *np, int flags,
- mach_port_t dotdotnode);
+ mach_port_t dotdotnode, unsigned depth);
/* Called when a protid CRED has no more references. (Because references\
to protids are maintained by the port management library, this is