diff options
author | Thomas Bushnell <thomas@gnu.org> | 1996-10-24 19:24:55 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1996-10-24 19:24:55 +0000 |
commit | afb43784ec70863c09ec927bb588355f2df4a3c5 (patch) | |
tree | 0064916e1490e02fbfcc131c7bbe647d7ca62c84 /libdiskfs | |
parent | ae34c667030c0bca9e82b601dd65018f5c489c3b (diff) |
Mon Oct 21 21:54:34 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* diskfs.h: Add extern inline protection.
* diskfs.c: New file.
* Makefile (OTHERSRCS): Add diskfs.c.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/ChangeLog | 6 | ||||
-rw-r--r-- | libdiskfs/Makefile | 2 | ||||
-rw-r--r-- | libdiskfs/diskfs.c | 2 | ||||
-rw-r--r-- | libdiskfs/diskfs.h | 26 |
4 files changed, 24 insertions, 12 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index 8910dffc..d1b458ee 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,9 @@ +Mon Oct 21 21:54:34 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + + * diskfs.h: Add extern inline protection. + * diskfs.c: New file. + * Makefile (OTHERSRCS): Add diskfs.c. + Fri Oct 11 21:55:45 1996 Miles Bader <miles@gnu.ai.mit.edu> * dir-lookup.c (diskfs_S_dir_lookup): Temporarily add O_EXLOCK and diff --git a/libdiskfs/Makefile b/libdiskfs/Makefile index aa982b90..228eb5c6 100644 --- a/libdiskfs/Makefile +++ b/libdiskfs/Makefile @@ -47,7 +47,7 @@ OTHERSRCS = conch-fetch.c conch-set.c dir-clear.c dir-init.c dir-renamed.c \ trans-callback.c readonly.c remount.c console.c disk-pager.c \ name-cache.c direnter.c dirrewrite.c dirremove.c lookup.c dead-name.c \ validate-mode.c validate-group.c validate-author.c validate-flags.c \ - validate-rdev.c validate-owner.c extra-version.c + validate-rdev.c validate-owner.c extra-version.c diskfs.c SRCS = $(OTHERSRCS) $(FSSRCS) $(IOSRCS) $(FSYSSRCS) $(IFSOCKSRCS) LCLHDRS = diskfs.h priv.h lithp.h fsmutations.h diskfs-pager.h installhdrs = diskfs.h diskfs-pager.h diff --git a/libdiskfs/diskfs.c b/libdiskfs/diskfs.c new file mode 100644 index 00000000..934fd168 --- /dev/null +++ b/libdiskfs/diskfs.c @@ -0,0 +1,2 @@ +#define DISKFS_EI +#include "diskfs.h" diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 7a684f95..e757e44e 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -25,6 +25,10 @@ #include <hurd/fshelp.h> #include <hurd/iohelp.h> +#ifndef DISKFS_EI +#define DISKFS_EI extern inline +#endif + /* Each user port referring to a file points to one of these (with the aid of the ports library). */ struct protid @@ -556,7 +560,7 @@ void diskfs_node_update (struct node *np, int wait); /* Add a hard reference to a node. If there were no hard references previously, then the node cannot be locked (because you must hold a hard reference to hold the lock). */ -extern inline void +DISKFS_EI void diskfs_nref (struct node *np) { int new_hardref; @@ -575,7 +579,7 @@ diskfs_nref (struct node *np) /* Unlock node NP and release a hard reference; if this is the last hard reference and there are no links to the file then request soft references to be dropped. */ -extern inline void +DISKFS_EI void diskfs_nput (struct node *np) { int tried_drop_softrefs = 0; @@ -625,7 +629,7 @@ diskfs_nput (struct node *np) hard reference in order to hold the lock). If this is the last hard reference and there are no links, then request soft references to be dropped. */ -extern inline void +DISKFS_EI void diskfs_nrele (struct node *np) { int tried_drop_softrefs = 0; @@ -665,7 +669,7 @@ diskfs_nrele (struct node *np) } /* Add a light reference to a node. */ -extern inline void +DISKFS_EI void diskfs_nref_light (struct node *np) { spin_lock (&diskfs_node_refcnt_lock); @@ -674,7 +678,7 @@ diskfs_nref_light (struct node *np) } /* Unlock node NP and release a light reference */ -extern inline void +DISKFS_EI void diskfs_nput_light (struct node *np) { spin_lock (&diskfs_node_refcnt_lock); @@ -692,7 +696,7 @@ diskfs_nput_light (struct node *np) /* Release a light reference on NP. If NP is locked by anyone, then this cannot be the last reference (because you must hold a hard reference in order to hold the lock). */ -extern inline void +DISKFS_EI void diskfs_nrele_light (struct node *np) { spin_lock (&diskfs_node_refcnt_lock); @@ -708,7 +712,7 @@ diskfs_nrele_light (struct node *np) } /* Return nonzero iff the user identified by CRED has uid UID. */ -extern inline int +DISKFS_EI int diskfs_isuid (uid_t uid, struct protid *cred) { int i; @@ -719,7 +723,7 @@ diskfs_isuid (uid_t uid, struct protid *cred) } /* Return nonzero iff the user identified by CRED has group GRP. */ -extern inline int +DISKFS_EI int diskfs_groupmember (uid_t grp, struct protid *cred) { int i; @@ -732,7 +736,7 @@ diskfs_groupmember (uid_t grp, struct protid *cred) /* Check to see if the user identified by CRED is permitted to do owner-only operations on node NP; if so, return 0; if not, return EPERM. */ -extern inline error_t +DISKFS_EI error_t diskfs_isowner (struct node *np, struct protid *cred) { /* Permitted if the user is the owner, superuser, or if the user @@ -749,7 +753,7 @@ diskfs_isowner (struct node *np, struct protid *cred) /* Check to see is the user identified by CRED is permitted to do operation OP on node NP. Op is one of S_IREAD, S_IWRITE, or S_IEXEC. Return 0 if the operation is permitted and EACCES if not. */ -extern inline error_t +DISKFS_EI error_t diskfs_access (struct node *np, int op, struct protid *cred) { int gotit; @@ -771,7 +775,7 @@ diskfs_access (struct node *np, int op, struct protid *cred) as diskfs_access (dp, S_IWRITE, cred), except when the directory has the sticky bit set. (If there is no existing file NP, then 0 can be passed.) */ -extern inline error_t +DISKFS_EI error_t diskfs_checkdirmod (struct node *dp, struct node *np, struct protid *cred) { |