]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-libafs-prototypes-20081129
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sat, 29 Nov 2008 18:20:24 +0000 (18:20 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 29 Nov 2008 18:20:24 +0000 (18:20 +0000)
LICENSE IPL10

 add prototypes missing from libafs

(cherry picked from commit b7e12a1aec9cd3591a02023fb6e87ba6cfcb152f)

28 files changed:
src/afs/DARWIN/osi_inode.c
src/afs/DARWIN/osi_vnodeops.c
src/afs/LINUX/osi_alloc.c
src/afs/LINUX/osi_inode.c
src/afs/LINUX/osi_syscall.c
src/afs/LINUX/osi_vnodeops.c
src/afs/UKERNEL/afs_usrops.c
src/afs/UKERNEL/osi_vnodeops.c
src/afs/UKERNEL/sysincludes.h
src/afs/VNOPS/afs_vnop_access.c
src/afs/VNOPS/afs_vnop_attrs.c
src/afs/VNOPS/afs_vnop_create.c
src/afs/VNOPS/afs_vnop_link.c
src/afs/VNOPS/afs_vnop_readdir.c
src/afs/VNOPS/afs_vnop_remove.c
src/afs/VNOPS/afs_vnop_strategy.c
src/afs/VNOPS/afs_vnop_symlink.c
src/afs/VNOPS/afs_vnop_write.c
src/afs/afs_call.c
src/afs/afs_cell.c
src/afs/afs_dcache.c
src/afs/afs_dynroot.c
src/afs/afs_lock.c
src/afs/afs_nfsclnt.c
src/afs/afs_osi.c
src/afs/afs_pioctl.c
src/afs/afs_prototypes.h
src/afs/exporter.h

index ddecc6c1d206abe7edbdd6327694e5c5b5937901..35b1dc32158b12c53febd5c96d482b46ed6fbc5f 100644 (file)
@@ -233,22 +233,21 @@ iforget(vp)
 }
 #endif
 
-afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, retval)
-     long *retval;
-     long dev, near_inode, param1, param2, param3, param4;
+int
+afs_syscall_icreate(long dev, long near_inode, long param1, long param2, 
+                   long param3, long param4, long *retval)
 {
     return EOPNOTSUPP;
 }
 
-afs_syscall_iopen(dev, inode, usrmod, retval)
-     long *retval;
-     int dev, inode, usrmod;
+int
+afs_syscall_iopen(int dev, int inode, int usrmod, long *retval)
 {
     return EOPNOTSUPP;
 }
 
-afs_syscall_iincdec(dev, inode, inode_p1, amount)
-     int dev, inode, inode_p1, amount;
+int
+afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount)
 {
     return EOPNOTSUPP;
 }
index c5ae14eead394126d0ee790f8dfe37ef6b77a96a..e9840f6b9a806357c2a4bc8d342396c9028e3b9a 100644 (file)
@@ -538,9 +538,9 @@ afs_vop_close(ap)
     struct vcache *avc = VTOAFS(vp);
     AFS_GLOCK();
     if (vop_cred)
-       code = afs_close(avc, ap->a_fflag, vop_cred, vop_proc);
+       code = afs_close(avc, ap->a_fflag, vop_cred);
     else
-       code = afs_close(avc, ap->a_fflag, &afs_osi_cred, vop_proc);
+       code = afs_close(avc, ap->a_fflag, &afs_osi_cred);
     osi_FlushPages(avc, vop_cred);     /* hold bozon lock, but not basic vnode lock */
     /* This is legit; it just forces the fstrace event to happen */
     code = afs_CheckCode(code, NULL, 60);
@@ -1097,8 +1097,7 @@ afs_vop_ioctl(ap)
     if (((ap->a_command >> 8) & 0xff) == 'V') {
        /* This is a VICEIOCTL call */
        AFS_GLOCK();
-       error = HandleIoctl(tvc, (struct file *)0 /*Not used */ ,
-                           ap->a_command, ap->a_data);
+       error = HandleIoctl(tvc, ap->a_command, ap->a_data);
        AFS_GUNLOCK();
        return (error);
     } else {
index e31d81ece7c8d17268529d7196f3daf6ad952dd9..fcde30abf54d1f4c8fbf89101f00cb510153044f 100644 (file)
@@ -223,7 +223,7 @@ local_free(void *p, size_t n)
  *    1 - success
  */
 static int
-linux_alloc_init()
+linux_alloc_init(void)
 {
     /* initiate our pool of osi_linux_mem structs */
     al_mem_pool =
@@ -270,7 +270,7 @@ hash_bucket_stat(size_t index, unsigned key, void *data)
 
 /* get_hash_stats() : get hash table statistics */
 static void
-get_hash_stats()
+get_hash_stats(void)
 {
     int i;
 
index 36d4c2a21dab26459f1e6c59e6b1fd896f0872e4..d6764e966291cfee0909a75673603fd73e5950bc 100644 (file)
@@ -29,19 +29,19 @@ RCSID
 #include "afs/afs_stats.h"     /* statistics stuff */
 
 int
-afs_syscall_icreate(void)
+afs_syscall_icreate(long a, long b, long c, long d, long e, long f)
 {
     return 0;
 }
 
 int
-afs_syscall_iopen(void)
+afs_syscall_iopen(int a, int b, int c)
 {
     return 0;
 }
 
 int
-afs_syscall_iincdec(void)
+afs_syscall_iincdec(int a, int v, int c, int d)
 {
     return 0;
 }
index 4b36b760fd61801ba36b511328d8e4c67ee9891c..5be011a6056f2a17b7485a8f8b1c9a060832a49d 100644 (file)
@@ -105,11 +105,11 @@ uint32_t syscall_jump_code[] = {
 };
 #endif
 
-extern long afs_xsetgroups();
+extern long afs_xsetgroups(int gidsetsize, gid_t * grouplist);
 asmlinkage long (*sys_setgroupsp) (int gidsetsize, gid_t * grouplist);
 
 #ifdef AFS_LINUX24_ENV
-extern int afs_xsetgroups32();
+extern int afs_xsetgroups32(int gidsetsize, gid_t * grouplist);
 asmlinkage int (*sys_setgroups32p) (int gidsetsize,
                                    __kernel_gid32_t * grouplist);
 #endif
index bb86670bfb1c77630085384a72f510d87e579d0c..6c74a68cd909da6c51ad3c809f20955edc28a733 100644 (file)
@@ -187,7 +187,6 @@ extern int BlobScan(struct dcache * afile, afs_int32 ablob);
 static int
 afs_linux_readdir(struct file *fp, void *dirbuf, filldir_t filldir)
 {
-    extern struct DirEntry *afs_dir_GetBlob();
     struct vcache *avc = VTOAFS(FILE_INODE(fp));
     struct vrequest treq;
     register struct dcache *tdc;
@@ -1240,7 +1239,6 @@ afs_linux_unlink(struct inode *dip, struct dentry *dp)
                                && !(tvc->states & CUnlinked)) {
        struct dentry *__dp;
        char *__name;
-       extern char *afs_newname();
 
        __dp = NULL;
        __name = NULL;
index 7f15ca43c218d119b314e44a66af7e211c205e44..0352b942b5585ff52f51d27b749567d40f09bc67 100644 (file)
@@ -254,21 +254,21 @@ usr_ioctl(void)
  * We do not support the inode related system calls
  */
 int
-afs_syscall_icreate(void)
+afs_syscall_icreate(long a, long b, long c, long d, long e, long f)
 {
     usr_assert(0);
     return 0;
 }
 
 int
-afs_syscall_iincdec(void)
+afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount)
 {
     usr_assert(0);
     return 0;
 }
 
 int
-afs_syscall_iopen(void)
+afs_syscall_iopen(int dev, int inode, int usrmod)
 {
     usr_assert(0);
     return 0;
index edd02b738dd7ed923726201d924103a5a6af357f..2e325ecfe25e45c91a1696512126f06fb3eb7966 100644 (file)
@@ -16,29 +16,7 @@ RCSID
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
 #include "afsincludes.h"       /* Afs-based standard headers */
 #include "afs/afs_stats.h"     /* statistics */
-
-extern int afs_noop();
-extern int afs_badop();
-
-extern int afs_open();
-extern int afs_close();
-extern int afs_getattr();
-extern int afs_setattr();
-extern int afs_access();
-extern int afs_lookup();
-extern int afs_create();
-extern int afs_remove();
-extern int afs_link();
-extern int afs_rename();
-extern int afs_mkdir();
-extern int afs_rmdir();
-extern int afs_readdir();
-extern int afs_symlink();
-extern int afs_readlink();
-extern int afs_fsync();
-extern int afs_lockctl();
-extern int afs_fid();
-
+    
 int
 afs_vrdwr(struct usr_vnode *avc, struct usr_uio *uio, int rw, int io,
          struct usr_ucred *cred)
index ab6d449af9f5a725aa09ddaa39977e0b938277e5..7a1e118d368e5d36ad53b1843b42a7d368539191 100644 (file)
@@ -1092,7 +1092,6 @@ struct usr_inode {
        unsigned long ic_spare[4];
     } i_ic;
 };
-extern struct usr_inode *iget();
 
 struct usr_fileops {
     int (*vno_rw) (void);
@@ -1109,7 +1108,7 @@ struct usr_file {
     char *f_data;
     long f_type;
 };
-extern struct usr_file *falloc();
+
 extern struct usr_file *getf(int);
 
 #ifdef fid_len
@@ -1200,33 +1199,46 @@ struct usr_socket {
 #define NDIRSIZ_LEN(len) \
 ((sizeof (struct usr_dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3))
 
+struct vcache;
+#define AFS_UCRED usr_ucred
+#define AFS_FLOCK       flock
+
+
 struct usr_vnodeops {
     int (*vn_open) (char *path, int flags, int mode);
     int (*vn_close) (int fd);
-    int (*vn_rdwr) ();
+    int (*vn_rdwr) (struct usr_vnode *avc, struct usr_uio *uio, 
+                   int rw, int io, struct usr_ucred *cred);
     int (*vn_ioctl) (void);
     int (*vn_select) (void);
-    int (*vn_getattr) ();
-    int (*vn_setattr) ();
-    int (*vn_access) ();
-    int (*vn_lookup) ();
-    int (*vn_create) ();
-    int (*vn_remove) ();
-    int (*vn_link) ();
-    int (*vn_rename) ();
-    int (*vn_mkdir) ();
-    int (*vn_rmdir) ();
-    int (*vn_readdir) ();
-    int (*vn_symlink) ();
-    int (*vn_readlink) ();
-    int (*vn_fsync) ();
-    int (*vn_inactive) ();
-    int (*vn_bmap) ();
-    int (*vn_strategy) ();
-    int (*vn_bread) ();
-    int (*vn_brelse) ();
-    int (*vn_lockctl) ();
-    int (*vn_fid) ();
+    int (*vn_getattr) (struct vcache *avc, struct vattr *, struct AFS_UCRED *);
+    int (*vn_setattr) (struct vcache *avc, struct vattr *, struct AFS_UCRED *);
+    int (*vn_access) (struct vcache *avc, afs_int32, struct AFS_UCRED *);
+    int (*vn_lookup) (struct vcache *adp, char *, struct vcache **, 
+                     struct AFS_UCRED *, int);
+    int (*vn_create) (struct vcache *adp, char *, struct vattr *, 
+                     enum vcexcl, int, struct vcache **, struct AFS_UCRED *);
+    int (*vn_remove) (struct vcache *adp, char *, struct AFS_UCRED *);
+    int (*vn_link) (struct vcache *avc, struct vcache *adp, char *, 
+                   struct AFS_UCRED *);
+    int (*vn_rename) (struct vcache *aodp, char *, struct vcache *, char *,
+                     struct AFS_UCRED *);
+    int (*vn_mkdir) (struct vcache *adp, char *, struct vattr *, 
+                    struct vcache **, struct AFS_UCRED *);
+    int (*vn_rmdir) (struct vcache *adp, char *, struct AFS_UCRED *);
+    int (*vn_readdir) (struct vcache *avc, struct uio *, struct AFS_UCRED *);
+    int (*vn_symlink) (struct vcache *adp, char *, struct vattr *, char *,
+                      struct AFS_UCRED *);
+    int (*vn_readlink) (struct vcache *avc, struct uio *, struct AFS_UCRED *);
+    int (*vn_fsync) (struct vcache *avc, struct AFS_UCRED *);
+    int (*vn_inactive) (struct vcache *avc, struct AFS_UCRED *acred);
+    int (*vn_bmap) (void);
+    int (*vn_strategy) (void);
+    int (*vn_bread) (void);
+    int (*vn_brelse) (void);
+    int (*vn_lockctl) (struct vcache *, struct AFS_FLOCK *, int,
+                      struct AFS_UCRED *);
+    int (*vn_fid) (struct vcache *avc, struct fid **);
 };
 
 struct usr_fs {
@@ -1245,12 +1257,12 @@ extern struct usr_mount *getmp(unsigned long);
 typedef long usr_whymountroot_t;
 
 struct usr_vfsops {
-    int (*vfs_mount) ();
-    int (*vfs_unmount) ();
-    int (*vfs_root) ();
-    int (*vfs_statfs) ();
-    int (*vfs_mountroot) ();
-    int (*vfs_swapvp) ();
+    int (*vfs_mount) (struct vfs *, char *, caddr_t);
+    int (*vfs_unmount) (struct vfs *);
+    int (*vfs_root) (struct vfs *, struct vnode **);
+    int (*vfs_statfs) (struct vfs *, struct statfs *);
+    int (*vfs_mountroot) (struct vfs *);
+    int (*vfs_swapvp) (void);
 };
 
 struct usr_vfs {
@@ -1266,7 +1278,7 @@ struct usr_vfs {
 
 struct usr_sysent {
     char sy_narg;
-    int (*sy_call) ();
+    int (*sy_call) (void);
 };
 extern struct usr_sysent usr_sysent[];
 
index 25fae9e96aec87f411bbb49b02b6d86ed9cee4db..5c65c65f4f1b99ead39c81bfc8cc0cb81bc4af20 100644 (file)
@@ -77,7 +77,6 @@ afs_GetAccessBits(register struct vcache *avc, register afs_int32 arights,
         * _is_ cached, obviously), make sure this user has valid tokens
         * before bothering with the RPC.  */
        struct unixuser *tu;
-       extern struct unixuser *afs_FindUser();
        tu = afs_FindUser(areq->uid, avc->fid.Cell, READ_LOCK);
        if (!tu) {
            return (arights & avc->anyAccess);
index 7ee49a619131d8b3055d1813658d4d2c4939fcab..cd0ddb96c871fe65226f51cf247a5174ab49eea1 100644 (file)
@@ -192,7 +192,6 @@ afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, struct AFS_UCRED *acred)
 {
     afs_int32 code;
     struct vrequest treq;
-    extern struct unixuser *afs_FindUser();
     struct unixuser *au;
     int inited = 0;
     OSI_VC_CONVERT(avc);
index 461a4d25180ac8ee0b75913675a79993cd1a2476..2127a9bb2f550ee7d104637b87465a2e346a682b 100644 (file)
@@ -339,7 +339,11 @@ afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
            code = afs_lookup(adp, aname, avcp, NULL, 0, NULL, acred);
 #endif /* AFS_SGI64_ENV */
 #else /* SUN5 || SGI */
+#if defined(UKERNEL)
+           code = afs_lookup(adp, aname, avcp, acred, 0);
+#else /* UKERNEL */
            code = afs_lookup(adp, aname, avcp, acred);
+#endif /* UKERNEL */
 #endif /* SUN5 || SGI */
 #endif /* !(AFS_OSF_ENV || AFS_DARWIN_ENV) */
        goto done;
index 4350af4eee3f0fd823bcd6ec1b9374b184da7074..5a3a6c27ee962aad0b9adcaf63663a483bc5d510 100644 (file)
@@ -33,14 +33,12 @@ extern afs_rwlock_t afs_xcbhash;
 
 int
 #if    defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-afs_link(OSI_VC_ARG(adp), avc, aname, acred)
+afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname, 
+        struct AFS_UCRED *acred)
 #else
-afs_link(avc, OSI_VC_ARG(adp), aname, acred)
+afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname, 
+        struct AFS_UCRED *acred)
 #endif
-     OSI_VC_DECL(adp);
-     struct vcache *avc;
-     char *aname;
-     struct AFS_UCRED *acred;
 {
     struct vrequest treq;
     register struct dcache *tdc;
index 025c8b9cf13c32f722ba1e1b92d1effe9567a15b..0b4299fd9b257e2dfc808278fc3884ba03892190 100644 (file)
@@ -38,12 +38,7 @@ RCSID
 #else
 #define DIRPAD 3
 #endif
-/**
- * A few definitions. This is until we have a proper header file
- * which ahs prototypes for all functions
- */
 
-extern struct DirEntry *afs_dir_GetBlob();
 /*
  * AFS readdir vnodeop and bulk stat support.
  */
@@ -234,9 +229,7 @@ int afs_rd_stash_i = 0;
 
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 int
-afs_readdir_type(avc, ade)
-     struct DirEntry *ade;
-     struct vcache *avc;
+afs_readdir_type(struct vcache *avc, struct DirEntry *ade)
 {
     struct VenusFid tfid;
     struct vcache *tvc;
@@ -284,18 +277,15 @@ afs_readdir_type(avc, ade)
 #endif
 char bufofzeros[64];           /* gotta fill with something */
 
-int
-afs_readdir_move(de, vc, auio, slen, rlen, off)
-     struct DirEntry *de;
-     struct vcache *vc;
-     struct uio *auio;
-     int slen;
 #ifdef AFS_SGI65_ENV
-     ssize_t rlen;
+int
+afs_readdir_move(struct DirEntry *de, struct vcache *vc, struct uio *auio, 
+                int slen, ssize_t rlen, afs_size_t off)
 #else
-     int rlen;
+int
+afs_readdir_move(struct DirEntry *de, struct vcache *vc, struct uio *auio, 
+                int slen, int rlen, afs_size_t off)
 #endif
-     afs_size_t off;
 {
     int code = 0;
     struct volume *tvp;
@@ -550,9 +540,7 @@ afs_readdir_move(de, vc, auio, slen, rlen, off)
  */
 
 void
-afs_bulkstat_send(avc, req)
-     struct vcache *avc;
-     struct vrequest *req;
+afs_bulkstat_send(struct vcache *avc, struct vrequest *req)
 {
     afs_rd_stash_i = 0;
 }
@@ -564,18 +552,15 @@ afs_bulkstat_send(avc, req)
 
 int
 #if    defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_readdir(OSI_VC_ARG(avc), auio, acred, eofp)
-     int *eofp;
+afs_readdir(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred, 
+           int *eofp)
 #else
 #if defined(AFS_HPUX100_ENV)
-afs_readdir2(OSI_VC_ARG(avc), auio, acred)
+afs_readdir2(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred)
 #else
-afs_readdir(OSI_VC_ARG(avc), auio, acred)
+afs_readdir(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred)
 #endif
 #endif
-     OSI_VC_DECL(avc);
-     struct uio *auio;
-     struct AFS_UCRED *acred;
 {
     struct vrequest treq;
     register struct dcache *tdc;
@@ -921,14 +906,13 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
 
 #if    defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
 #ifdef AFS_OSF_ENV
-afs1_readdir(avc, auio, acred, eofp)
-     int *eofp;
+int
+afs1_readdir(struct vcache *avc, struct uio *auio, struct AFS_UCRED *acred, 
+            int *eofp)
 #else
-afs1_readdir(avc, auio, acred)
+int
+afs1_readdir(struct vcache *avc, struct uio *auio, struct AFS_UCRED *acred)
 #endif
-     struct vcache *avc;
-     struct uio *auio;
-     struct AFS_UCRED *acred;
 {
     struct vrequest treq;
     register struct dcache *tdc;
index 3d546a428b1e698bfd68084992fddca73e199fcf..36cdf7b146708ed7ff5629c425c06052dc63bea6 100644 (file)
@@ -46,10 +46,8 @@ extern afs_rwlock_t afs_xcbhash;
 afs_Wire(avc, areq)
 #else /* AFS_OSF_ENV */
 static void
-FetchWholeEnchilada(avc, areq)
+FetchWholeEnchilada(register struct vcache *avc, struct vrequest *areq)
 #endif
-     struct vrequest *areq;
-     register struct vcache *avc;
 {
     register afs_int32 nextChunk;
     register struct dcache *tdc;
@@ -86,8 +84,7 @@ FetchWholeEnchilada(avc, areq)
  *  Tests whether file is wired down, after unwiring the file if it
  *  is found to be inactive (ie not open and not being paged from).
  */
-afs_IsWired(avc)
-     register struct vcache *avc;
+afs_IsWired(register struct vcache *avc)
 {
     if (avc->states & CWired) {
        if (osi_Active(avc)) {
@@ -222,10 +219,7 @@ char *Tnam1;
 /* Note that we don't set CDirty here, this is OK because the unlink
  * RPC is called synchronously */
 int
-afs_remove(OSI_VC_ARG(adp), aname, acred)
-     OSI_VC_DECL(adp);
-     char *aname;
-     struct AFS_UCRED *acred;
+afs_remove(OSI_VC_DECL(adp), char *aname, struct AFS_UCRED *acred)
 {
     struct vrequest treq;
     register struct dcache *tdc;
index 766c2da236e2b6d66f61eaf15232c728beb32938..54cfc65292f870d1ea4543598ce80d286d31c772 100644 (file)
@@ -29,14 +29,11 @@ RCSID
 
 
 
-int
 #if    defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_ustrategy(abp, credp)
-     struct AFS_UCRED *credp;
+int afs_ustrategy(register struct buf *abp, struct AFS_UCRED *credp)
 #else
-afs_ustrategy(abp)
+int afs_ustrategy(register struct buf *abp)
 #endif
-     register struct buf *abp;
 {
     register afs_int32 code;
     struct uio tuio;
index 23425b5e161deab174dc16611d78709bf37f3b8d..7208655cde91056ce8df35ed7c669d9668622cad 100644 (file)
@@ -41,13 +41,9 @@ extern afs_rwlock_t afs_xcbhash;
 
 
 /* don't set CDirty in here because RPC is called synchronously */
-int afs_symlink
-  (OSI_VC_ARG(adp), aname, attrs, atargetName, acred)
-     OSI_VC_DECL(adp);
-     char *atargetName;
-     char *aname;
-     struct vattr *attrs;
-     struct AFS_UCRED *acred;
+int 
+afs_symlink(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, 
+           char *atargetName, struct AFS_UCRED *acred)
 {
     afs_uint32 now = 0;
     struct vrequest treq;
@@ -360,10 +356,7 @@ afs_UFSHandleLink(register struct vcache *avc, struct vrequest *areq)
 }
 
 int
-afs_readlink(OSI_VC_ARG(avc), auio, acred)
-     OSI_VC_DECL(avc);
-     struct uio *auio;
-     struct AFS_UCRED *acred;
+afs_readlink(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred)
 {
     register afs_int32 code;
     struct vrequest treq;
index 5b08d42443b19bfb9008c3d62caf474cc478a63f..6a1f9b52ffe983646b3274c9d6c86e771744c8dc 100644 (file)
@@ -850,33 +850,21 @@ afs_closex(register struct file *afd)
 
 /* handle any closing cleanup stuff */
 int
-#ifdef AFS_SGI_ENV
-afs_close(OSI_VC_ARG(avc), aflags, lastclose,
-#if !defined(AFS_SGI65_ENV)
-         offset,
-#endif
-         acred
-#if defined(AFS_SGI64_ENV) && !defined(AFS_SGI65_ENV)
-         , flp
-#endif
-    )
-     lastclose_t lastclose;
-#if !defined(AFS_SGI65_ENV)
-     off_t offset;
-#if defined(AFS_SGI64_ENV)
-     struct flid *flp;
-#endif
-#endif
+#if defined(AFS_SGI65_ENV)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclost_t lastclose,
+         struct AFS_UCRED *acred)
+#elif defined(AFS_SGI64_ENV)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclose_t lastclose,
+         off_t offset, struct AFS_UCRED *acred, struct flid *flp)
+#elif defined(AFS_SGI_ENV)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclose_t lastclose
+         off_t offset, struct AFS_UCRED *acred)
 #elif defined(AFS_SUN5_ENV)
-afs_close(OSI_VC_ARG(avc), aflags, count, offset, acred)
-     offset_t offset;
-     int count;
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count, offset_t offset, 
+        struct AFS_UCRED *acred)
 #else
-afs_close(OSI_VC_ARG(avc), aflags, acred)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, struct AFS_UCRED *acred)
 #endif
-     OSI_VC_DECL(avc);
-     afs_int32 aflags;
-     struct AFS_UCRED *acred;
 {
     register afs_int32 code;
     register struct brequest *tb;
index 5ebce8e9955fca1ceebc17b587a7c35f4da79298..97c96550d72c1008d2825b4d12bb97fec2fc4d1b 100644 (file)
@@ -86,7 +86,6 @@ extern int afs_vfs_mount();
 static int
 afs_InitSetup(int preallocs)
 {
-    extern void afs_InitStats();
     int code;
 
     if (afs_InitSetup_done)
@@ -477,11 +476,8 @@ wait_for_cachedefs(void) {
 #endif
 }
 
-/* leaving as is, probably will barf if we add prototypes here since it's likely being called
-with partial list */
 int
-afs_syscall_call(parm, parm2, parm3, parm4, parm5, parm6)
-     long parm, parm2, parm3, parm4, parm5, parm6;
+afs_syscall_call(long parm, long parm2, long parm3, long parm4, long parm5, long parm6)
 {
     afs_int32 code = 0;
 #if defined(AFS_SGI61_ENV) || defined(AFS_SUN57_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
index 3cf1c829deefbc818e528435fa0669817f763867..64496f6f4f6f4e946dc0f65f5b50e40dd6202546 100644 (file)
@@ -54,7 +54,7 @@ static struct {
  * Terminate the AFSDB handler, used on shutdown.
  */
 void
-afs_StopAFSDB()
+afs_StopAFSDB(void)
 {
     if (afsdb_handler_running) {
        afs_osi_Wakeup(&afsdb_req);
@@ -1066,7 +1066,7 @@ afs_NewCell(char *acellName, afs_int32 * acellHosts, int aflags,
  * Perform whatever initialization is necessary.
  */
 void
-afs_CellInit()
+afs_CellInit(void)
 {
     RWLOCK_INIT(&afs_xcell, "afs_xcell");
 #ifdef AFS_AFSDB_ENV
@@ -1083,7 +1083,7 @@ afs_CellInit()
  * Called on shutdown, should deallocate memory, etc.
  */
 void
-shutdown_cell()
+shutdown_cell(void)
 {
     struct afs_q *cq, *tq;
     struct cell *tc;
index 465d6a927811068221b6bd86386ed979d7fadad9..31b106af315a26f5ae5a3179ae05f685db418db4 100644 (file)
@@ -106,7 +106,16 @@ afs_int32 afs_dcentries;   /*!< In-memory dcache entries */
 
 int dcacheDisabled = 0;
 
-static int afs_UFSCacheFetchProc(), afs_UFSCacheStoreProc();
+static int afs_UFSCacheFetchProc(struct rx_call *, struct osi_file *,
+                                afs_size_t, struct dcache *,
+                                struct vcache *, afs_size_t *,
+                                afs_size_t *, afs_int32);
+
+static int afs_UFSCacheStoreProc(struct rx_call *, struct osi_file *,
+                                afs_int32, struct vcache *,
+                                int *, afs_size_t *,
+                                afs_size_t *);
+
 struct afs_cacheOps afs_UfsCacheOps = {
 #if defined(LINUX_USE_FH)
     osi_UFSOpen_fh,
index a0e961890f3659dedd1fa2e005d74b3f8133765b..2ab36f2104d0d9ad45ba8b796260877091590aa2 100644 (file)
@@ -84,7 +84,7 @@ static int afs_dynSymlinkIndex = 0;
  * Set up a cell for dynroot if it's not there yet.
  */
 static int
-afs_dynrootCellInit()
+afs_dynrootCellInit(void)
 {
     if (!afs_dynrootCell) {
        afs_int32 cellHosts[MAXCELLHOSTS];
index 8573a0753a44e7b46944a86591035f75fa33a1be..80835db81ac126528b8c3423cbf5ebff5f9a6805 100644 (file)
@@ -35,9 +35,8 @@ RCSID
 /* probably needed if lock_trace is enabled - should ifdef */
 int afs_trclock = 0;
 
-void Lock_Obtain();
-void Lock_ReleaseR();
-void Lock_ReleaseW();
+void Lock_ReleaseR(struct afs_lock *lock);
+void Lock_ReleaseW(struct afs_lock *lock);
 
 void
 Lock_Init(register struct afs_lock *lock)
index a4c898fc298708634fa2ed323a76e95b15910ba3..13424fd5e97b9b03222b2891982b61196a0d5cab 100644 (file)
@@ -46,10 +46,10 @@ struct nfsclientpag *afs_nfspags[NNFSCLIENTS];
 afs_lock_t afs_xnfspag /*, afs_xnfsreq */ ;
 extern struct afs_exporter *afs_nfsexporter;
 
-/* Creates an nfsclientpag structure for the (uid, host) pair if one doesn't exist. RefCount is incremented and it's time stamped. */
+/* Creates an nfsclientpag structure for the (uid, host) pair if one doesn't 
+ * exist. RefCount is incremented and it's time stamped. */
 static struct nfsclientpag *
-afs_GetNfsClientPag(uid, host)
-     register afs_int32 uid, host;
+afs_GetNfsClientPag(register afs_int32 uid, register afs_int32 host)
 {
     register struct nfsclientpag *np;
     register afs_int32 i, now;
@@ -107,10 +107,11 @@ afs_PutNfsClientPag(np)
 }
 
 
-/* Return the nfsclientpag structure associated with the (uid, host) or {pag, host} pair, if pag is nonzero. RefCount is incremented and it's time stamped. */
+/* Return the nfsclientpag structure associated with the (uid, host) or 
+ * {pag, host} pair, if pag is nonzero. RefCount is incremented and it's 
+ * time stamped. */
 static struct nfsclientpag *
-afs_FindNfsClientPag(uid, host, pag)
-     register afs_int32 uid, host, pag;
+afs_FindNfsClientPag(afs_int32 uid, afs_int32 host, afs_int32 pag)
 {
     register struct nfsclientpag *np;
     register afs_int32 i;
@@ -191,7 +192,10 @@ afs_nfsclient_reqhandler(struct afs_exporter *exporter,
 
     afs_nfsexporter->exp_stats.calls++;
     if (!(afs_nfsexporter->exp_states & EXP_EXPORTED)) {
-       /* No afs requests accepted as long as EXPORTED flag is turned 'off'. Set/Reset via a pioctl call (fs exportafs). Note that this is on top of the /etc/exports nfs requirement (i.e. /afs must be exported to all or whomever there too!)
+       /* No afs requests accepted as long as EXPORTED flag is turned 'off'. 
+        * Set/Reset via a pioctl call (fs exportafs). Note that this is on 
+        * top of the /etc/exports nfs requirement (i.e. /afs must be 
+        * exported to all or whomever there too!)
         */
        afs_nfsexporter->exp_stats.rejectedcalls++;
        return EINVAL;
@@ -239,7 +243,11 @@ afs_nfsclient_reqhandler(struct afs_exporter *exporter,
     if ((afs_nfsexporter->exp_states & EXP_CLIPAGS))
                pag = NOPAG;
     if (!np) {
-       /* Even if there is a "good" pag coming in we don't accept it if no nfsclientpag struct exists for the user since that would mean that the translator rebooted and therefore we ignore all older pag values */
+       /* Even if there is a "good" pag coming in we don't accept it if no 
+        * nfsclientpag struct exists for the user since that would mean 
+        * that the translator rebooted and therefore we ignore all older 
+        * pag values 
+        */
 #ifdef AFS_OSF_ENV
        if (code = setpag(u.u_procp, cred, -1, &pag, 0)) {      /* XXX u.u_procp is a no-op XXX */
 #else
@@ -548,10 +556,10 @@ afs_nfsclient_GC(exporter, pag)
 
 
 int
-afs_nfsclient_stats(export)
-     register struct afs_exporter *export;
+afs_nfsclient_stats(register struct afs_exporter *export)
 {
-    /* Nothing much to do here yet since most important stats are collected directly in the afs_exporter structure itself */
+    /* Nothing much to do here yet since most important stats are collected 
+     * directly in the afs_exporter structure itself */
     AFS_STATCNT(afs_nfsclient_stats);
     return 0;
 }
index eab69a85b404713f9c38650f222f3e71d56c3657..e0f52ddab37f01b626b9eb0768675fffe793d14f 100644 (file)
@@ -171,7 +171,7 @@ afs_osi_MaskUserLoop()
 }
 
 void 
-afs_osi_UnmaskUserLoop()
+afs_osi_UnmaskUserLoop(void)
 {
 #ifdef AFS_DARWIN_ENV
     afs_osi_fullSigRestore();
index 49274a26241e66142517ca57f12185609e0e9def..90cbdad893dfc03e4457ff4a260adf682cecf60d 100644 (file)
@@ -147,8 +147,11 @@ int afs_HandlePioctl(struct vnode *avp, afs_int32 acom,
 static int Prefetch(char *apath, struct afs_ioctl *adata, int afollow,
                    struct AFS_UCRED *acred);
 
+typedef int (*pioctlFunction) (struct vcache *, int, struct vrequest *,
+                              char *, char *, afs_int32, afs_int32 *,
+                              struct AFS_UCRED **);
 
-static int (*(VpioctlSw[])) () = {
+static pioctlFunction VpioctlSw[] = {
     PBogus,                    /* 0 */
        PSetAcl,                /* 1 */
        PGetAcl,                /* 2 */
@@ -221,7 +224,7 @@ static int (*(VpioctlSw[])) () = {
        PGetVnodeXStatus2,      /* 69 - get caller access and some vcache status */
 };
 
-static int (*(CpioctlSw[])) () = {
+static pioctlFunction CpioctlSw[] = {
     PBogus,                    /* 0 */
        PNewAlias,              /* 1 -- create new cell alias */
        PListAliases,           /* 2 -- list cell aliases */
@@ -383,16 +386,18 @@ afs_ioctl(OSI_VN_DECL(tvc), int cmd, void *arg, int flag, cred_t * cr,
 #ifdef AFS_AIX32_ENV
 #ifdef AFS_AIX51_ENV
 #ifdef __64BIT__
-kioctl(fdes, com, arg, ext, arg2, arg3)
+int
+kioctl(int fdes, int com, caddr_t arg, caddr_t ext, caddr_t arg2, 
+          caddr_t arg3)
 #else /* __64BIT__ */
-kioctl32(fdes, com, arg, ext, arg2, arg3)
+int
+kioctl32(int fdes, int com, caddr_t arg, caddr_t ext, caddr_t arg2, 
+            caddr_t arg3)
 #endif /* __64BIT__ */
-     caddr_t arg2, arg3;
 #else
-kioctl(fdes, com, arg, ext)
+int
+kioctl(int fdes, int com, caddr_t arg, caddr_t ext)
 #endif
-     int fdes, com;
-     caddr_t arg, ext;
 {
     struct a {
        int fd, com;
@@ -410,15 +415,12 @@ struct afs_ioctl_sys {
     int arg;
 };
 
-afs_xioctl(uap, rvp)
-     struct afs_ioctl_sys *uap;
-     rval_t *rvp;
+int 
+afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp)
 {
 #elif defined(AFS_OSF_ENV)
-afs_xioctl(p, args, retval)
-     struct proc *p;
-     void *args;
-     long *retval;
+int 
+afs_xioctl(struct proc *p, void *args, long *retval)
 {
     struct a {
        long fd;
@@ -428,10 +430,8 @@ afs_xioctl(p, args, retval)
 #elif defined(AFS_FBSD50_ENV)
 #define arg data
 int
-afs_xioctl(td, uap, retval)
-     struct thread *td;
-     register struct ioctl_args *uap;
-     register_t *retval;
+afs_xioctl(struct thread *td, register struct ioctl_args *uap, 
+          register_t *retval)
 {
     struct proc *p = td->td_proc;
 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
@@ -442,10 +442,7 @@ struct ioctl_args {
 };
 
 int
-afs_xioctl(p, uap, retval)
-     struct proc *p;
-     register struct ioctl_args *uap;
-     register_t *retval;
+afs_xioctl(struct proc *p, register struct ioctl_args *uap, register_t *retval)
 {
 #elif defined(AFS_LINUX22_ENV)
 struct afs_ioctl_sys {
@@ -715,10 +712,7 @@ afs_pioctl(struct pioctlargs *uap, rval_t * rvp)
 }
 
 #elif defined(AFS_OSF_ENV)
-afs_pioctl(p, args, retval)
-     struct proc *p;
-     void *args;
-     int *retval;
+afs_pioctl(struct proc *p, void *args, int *retval)
 {
     struct a {
        char *path;
@@ -733,10 +727,7 @@ afs_pioctl(p, args, retval)
 
 #elif defined(AFS_FBSD50_ENV)
 int
-afs_pioctl(td, args, retval)
-     struct thread *td;
-     void *args;
-     int *retval;
+afs_pioctl(struct thread *td, void *args, int *retval)
 {
     struct a {
        char *path;
@@ -752,10 +743,7 @@ afs_pioctl(td, args, retval)
 
 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 int
-afs_pioctl(p, args, retval)
-     struct proc *p;
-     void *args;
-     int *retval;
+afs_pioctl(struct proc *p, void *args, int *retval)
 {
     struct a {
        char *path;
@@ -787,21 +775,16 @@ afs_pioctl(p, args, retval)
 
 int
 #ifdef AFS_SUN5_ENV
-afs_syscall_pioctl(path, com, cmarg, follow, rvp, credp)
-     rval_t *rvp;
-     struct AFS_UCRED *credp;
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow, 
+                  rval_t *vvp, struct AFS_UCRED *credp)
 #else
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_syscall_pioctl(path, com, cmarg, follow, credp)
-     struct AFS_UCRED *credp;
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow, 
+                  struct AFS_UCRED *credp)
 #else
-afs_syscall_pioctl(path, com, cmarg, follow)
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
 #endif
 #endif
-     char *path;
-     unsigned int com;
-     caddr_t cmarg;
-     int follow;
 {
     struct afs_ioctl data;
 #ifdef AFS_NEED_CLIENTCONTEXT
@@ -1032,7 +1015,7 @@ afs_HandlePioctl(struct vnode *avp, afs_int32 acom,
     register afs_int32 function, device;
     afs_int32 inSize, outSize, outSizeMax;
     char *inData, *outData;
-    int (*(*pioctlSw)) ();
+    pioctlFunction *pioctlSw;
     int pioctlSwSize;
     struct afs_fakestat_state fakestate;
 
@@ -3439,10 +3422,7 @@ ReSortCells(int s, afs_int32 * l, int vlonly)
 
 static int debugsetsp = 0;
 static int
-afs_setsprefs(sp, num, vlonly)
-     struct spref *sp;
-     unsigned int num;
-     unsigned int vlonly;
+afs_setsprefs(struct spref *sp, unsigned int num, unsigned int vlonly)
 {
     struct srvAddr *sa;
     int i, j, k, matches, touchedSize;
index c9078e681c679d32856295c7415ccad26b48b8d6..25aac85061745d8e05bdcd90989984d57353ebbe 100644 (file)
@@ -549,7 +549,14 @@ extern void *osi_AllocSmallSpace(size_t size);
 extern void shutdown_osinet(void);
 
 /* afs_osi_pag.c */
-extern int afs_setpag();
+#if defined(AFS_SUN5_ENV)
+extern int afs_setpag(struct AFS_UCRED **credpp);
+#elif  defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_setpag(struct proc *p, void *args, int *retval);
+#else
+extern int afs_setpag(void);
+#endif
+       
 extern afs_uint32 genpag(void);
 extern afs_uint32 getpag(void);
 #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
@@ -626,10 +633,21 @@ extern int afs_osi_SleepSig(void *event);
 
 
 /* ARCH/osi_inode.c */
-extern int afs_syscall_icreate();
-extern int afs_syscall_iopen();
-extern int afs_syscall_iincdec();
-
+#ifdef AFS_SUN5_ENV
+extern int afs_syscall_icreate(dev_t, long, long, long, long, long, 
+                              rval_t *, struct AFS_UCRED *);
+extern int afs_syscall_iopen(dev_t, int, int, rval_t *, struct AFS_UCRED *);
+extern int afs_syscall_iincdec(dev_t, int, int, int, rval_t *, 
+                              struct AFS_UCRED *);
+#elif defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_syscall_icreate(long, long, long, long, long, long, long*);
+extern int afs_syscall_iopen(int dev, int inode, int usrmod, long *retval);
+extern int afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount);
+#else
+extern int afs_syscall_icreate(long, long, long, long, long, long);
+extern int afs_syscall_iopen(int, int, int);
+extern int afs_syscall_iincdec(int, int, int, int);
+#endif
 
 /* ARCH/osi_file.c */
 extern int afs_osicred_initialized;
@@ -696,6 +714,7 @@ extern int numvnodes;               /* number vnodes in use now */
 extern struct vfs_ubcops afs_ubcops;
 #endif
 #endif
+extern int afs_inactive(struct vcache *avc, struct AFS_UCRED *acred);
 
 /* afs_osifile.c */
 
@@ -736,7 +755,19 @@ extern afs_int32 afs_waitForever;
 extern short afs_waitForeverCount;
 extern afs_int32 afs_showflags;
 extern int afs_defaultAsynchrony;
-extern int afs_syscall_pioctl();
+#ifdef AFS_SUN5_ENV
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, 
+                             int follow, rval_t *rvp, struct AFS_UCRED *credp);
+#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, 
+                             int follow, struct AFS_UCRED *credp);
+#else
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
+                             int follow);
+#endif
+extern int HandleIoctl(register struct vcache *avc, register afs_int32 acom,
+                      struct afs_ioctl *adata);
+
 
 /* afs_segments.c */
 extern int afs_StoreMini(register struct vcache *avc, struct vrequest *areq);
@@ -1012,14 +1043,56 @@ extern int afs_LocalHero(register struct vcache *avc,
                         register struct dcache *adc,
                         register AFSFetchStatus * astat, register int aincr);
 
+/* VNOPS/afs_vnop_dirops.c */
+
+extern int afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, 
+                    register struct vcache **avcp, struct AFS_UCRED *acred);
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp, 
+                    struct AFS_UCRED *acred);
+#else
+extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct AFS_UCRED *acred);
+#endif
+
+struct fid;
+/* VNOPS/afs_vnop_fid.c */
+#if !defined(AFS_ATHENA_ENV)
+#ifdef AFS_AIX41_ENV
+int afs_fid(OSI_VC_DECL(avc), struct fid *fidpp, struct ucred *credp);
+#elif defined(AFS_OSF_ENV) || defined(AFS_SUN54_ENV)
+int afs_fid(OSI_VC_DECL(avc), struct fid *fidpp);
+#else
+int afs_fid(OSI_VC_DECL(avc), struct fid **fidpp);
+#endif                          /* AFS_AIX41_ENV */
+#endif
 
 /* VNOPS/afs_vnop_flock.c */
+extern afs_int32 lastWarnTime;
+
 extern void lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp,
                      int clid);
 extern int HandleFlock(register struct vcache *avc, int acom,
                       struct vrequest *areq, pid_t clid, int onlymine);
 
+#ifdef AFS_OSF_ENV
+extern int afs_lockctl(struct vcache * avc, struct eflock * af, int flag,
+                      struct AFS_UCRED * acred, pid_t clid, off_t offset);
+#elif defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
+                      struct AFS_UCRED * acred, pid_t clid);
+#else
+extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
+                      struct AFS_UCRED * acred);
+#endif
 
+/* VNOPS/afs_vnop_link.c */
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+extern int afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname, 
+                   struct AFS_UCRED *acred);
+#else
+extern int afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname, 
+                   struct AFS_UCRED *acred);
+#endif
 
 /* VNOPS/afs_vnop_lookup.c */
 extern int EvalMountPoint(register struct vcache *avc, struct vcache *advc,
@@ -1040,9 +1113,21 @@ extern int Next_AtSys(register struct vcache *avc, struct vrequest *areq,
                      struct sysname_info *state);
 extern int afs_DoBulkStat(struct vcache *adp, long dirCookie,
                          struct vrequest *areqp);
-extern int afs_lookup();
-
-
+#ifdef AFS_OSF_ENV
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, 
+                     struct AFS_UCRED *acred, int opflag, int wantparent);
+#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, 
+                     struct pathname *pnp, int flags, struct vnode *rdir, 
+                     struct AFS_UCRED *acred);
+#elif defined(UKERNEL)
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, 
+                     struct AFS_UCRED *acred, int flags);
+#else
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, 
+                     struct AFS_UCRED *acred);
+#endif
+       
 /* VNOPS/afs_vnop_open.c */
 #ifdef AFS_SGI64_ENV
 extern int afs_open(bhv_desc_t * bhv, struct vcache **avcp, afs_int32 aflags,
@@ -1069,29 +1154,55 @@ extern void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
 
 /* VNOPS/afs_vnop_readdir.c */
 extern int afs_rd_stash_i;
-
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio, 
+                      struct AFS_UCRED *acred, int *eofp);
+#elif defined(AFS_HPUX100_ENV)
+extern int afs_readdir2(OIS_VC_DECL(avc), struct uio *auio, 
+                       struct AFS_UCRED *acred);
+#else
+extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio, 
+                      struct AFS_UCRED *acred);
+#endif
 
 /* VNOPS/afs_vnop_remove.c */
 extern int afsremove(register struct vcache *adp, register struct dcache *tdc,
                     register struct vcache *tvc, char *aname,
                     struct AFS_UCRED *acred, struct vrequest *treqp);
 extern int afs_remunlink(register struct vcache *avc, register int doit);
-
+extern int afs_remove(OSI_VC_DECL(adp), char *aname, struct AFS_UCRED *acred);
+extern char *afs_newname(void);
 
 /* VNOPS/afs_vnop_rename.c */
 extern int afsrename(struct vcache *aodp, char *aname1, struct vcache *andp,
                     char *aname2, struct AFS_UCRED *acred,
                     struct vrequest *areq);
-
+#ifdef AFS_SGI_ENV
+extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, 
+                     char *aname2, struct pathname *npnp, 
+                     struct AFS_UCRED *acred);
+#else
+extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, 
+                     char *aname2, struct AFS_UCRED *acred);
+#endif
+       
+/* VNOPS/afs_vnop_strategy.c */
+#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_ustrategy(register struct buf *adp, struct AFS_UCRED *credp);
+#else
+extern int afs_ustrategy(register struct buf *adp);
+#endif
 
 /* VNOPS/afs_vnop_symlink.c */
 extern int afs_MemHandleLink(register struct vcache *avc,
                             struct vrequest *areq);
 extern int afs_UFSHandleLink(register struct vcache *avc,
                             struct vrequest *areq);
-
-/* VNOPS/afs_vnop_flock.c */
-extern afs_int32 lastWarnTime;
+extern int afs_symlink(OSI_VC_DECL(adp), char *aname, 
+                      struct vattr *attrs, char *atargetName, 
+                      struct AFS_UCRED *acred);
+extern int afs_readlink(OSI_VC_DECL(avc), struct uio *auio,
+                       struct AFS_UCRED *acred);
 
 /* VNOPS/afs_vnop_write.c */
 extern int afs_MemWrite(register struct vcache *avc, struct uio *auio,
@@ -1104,21 +1215,37 @@ extern int afs_DoPartialWrite(register struct vcache *avc,
                              struct vrequest *areq);
 extern int afs_closex(register struct file *afd);
 
-/* other VNOPS (please fix these) */
-extern int afs_close();
-extern int HandleIoctl();
-extern int afs_fsync();
-extern int afs_remove();
-extern int afs_link();
-extern int afs_rename();
-extern int afs_mkdir();
-extern int afs_rmdir();
-extern int afs_symlink();
-extern int afs_readdir();
-extern int afs_readlink();
-extern int afs_ustrategy();
-extern int afs_lockctl();
+#ifdef AFS_SGI65_ENV
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, 
+                    lastclose_t lastclose, struct AFS_UCRED *acred);
+#elif defined(AFS_SGI64_ENV)
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, 
+                    lastclose_t lastclose, off_t offset, 
+                    struct AFS_UCRED *acred, struct flid *flp);
+#elif defined(AFS_SGI_ENV)
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, 
+                    lastclose_t lastclose, off_t offset,
+                    struct AFS_UCRED *acred);
+#elif defined(AFS_SUN5_ENV)
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count, 
+                    offset_t offset, acred);
+#else
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,  
+                    struct AFS_UCRED *acred);
+#endif
 
+#ifdef AFS_OSF_ENV
+extern int afs_fsync(OSI_VC_DECL(avc), int fflags, struct AFS_UCRED *acred, 
+                    int waitfor);
+#elif defined(AFS_SGI65_ENV)
+extern int afs_fsync(OSI_VC_DECL(avc), int flags, struct AFS_UCRED *acred, 
+                    off_t start, off_t stop);
+#elif defined(AFS_SGI_ENV) || defined(AFS_SUN53_ENV)
+extern int afs_fsync(OSI_VC_DECL(avc), int flag, struct AFS_UCRED *acred);
+#else
+extern int afs_fsync(OSI_VC_DECL(avc), struct AFS_UCRED *acred);
+#endif
+               
 
 /* afs_volume.c */
 extern afs_int32 afs_FVIndex;
index b3ca0c9a6683a535c5524f8f0d2900ecfdba861d..9e461c21514f38815e913cae8289af6e0f030aae 100644 (file)
 #endif
 #endif
 
+struct afs_exporter;
+
 struct exporterops {
-    int (*export_reqhandler) ();
-    void (*export_hold) ();
-    void (*export_rele) ();
-    int (*export_sysname) ();
-    void (*export_garbagecollect) ();
-    int (*export_statistics) ();
-    int (*export_checkhost) ();
-    afs_int32 (*export_gethost) ();
+    int (*export_reqhandler) (struct afs_exporter *exp,
+                             struct AFS_UCRED **cred,
+                             afs_uint32 host,
+                             afs_int32 pag,
+                             struct afs_exporter **expp);
+    void (*export_hold) (struct afs_exporter *exp);
+    void (*export_rele) (struct afs_exporter *exp);
+    int (*export_sysname) (struct afs_exporter *exp,
+                          char *inname,
+                          char **outname,
+                          int *num,
+                          int allpags);
+    void (*export_garbagecollect) (struct afs_exporter *exp,
+                                  afs_int32 param);
+    int (*export_statistics) (struct afs_exporter *exp);
+    int (*export_checkhost) (struct afs_exporter *exp, afs_int32 host);
+    afs_int32 (*export_gethost) (struct afs_exporter *exp);
 };
 
 struct exporterstats {