From b7e12a1aec9cd3591a02023fb6e87ba6cfcb152f Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 29 Nov 2008 18:20:03 +0000 Subject: [PATCH] libafs-prototypes-20081129 LICENSE IPL10 add prototypes missing from libafs --- src/afs/DARWIN/osi_inode.c | 15 ++-- src/afs/DARWIN/osi_vnodeops.c | 7 +- src/afs/LINUX/osi_alloc.c | 4 +- src/afs/LINUX/osi_inode.c | 6 +- src/afs/LINUX/osi_syscall.c | 4 +- src/afs/LINUX/osi_vnodeops.c | 2 - src/afs/UKERNEL/afs_usrops.c | 6 +- src/afs/UKERNEL/osi_vnodeops.c | 24 +---- src/afs/UKERNEL/sysincludes.h | 74 ++++++++------- src/afs/VNOPS/afs_vnop_access.c | 1 - src/afs/VNOPS/afs_vnop_attrs.c | 1 - src/afs/VNOPS/afs_vnop_create.c | 4 + src/afs/VNOPS/afs_vnop_link.c | 10 +-- src/afs/VNOPS/afs_vnop_readdir.c | 50 ++++------- src/afs/VNOPS/afs_vnop_remove.c | 12 +-- src/afs/VNOPS/afs_vnop_strategy.c | 7 +- src/afs/VNOPS/afs_vnop_symlink.c | 15 +--- src/afs/VNOPS/afs_vnop_write.c | 36 +++----- src/afs/afs_call.c | 6 +- src/afs/afs_cell.c | 6 +- src/afs/afs_dcache.c | 11 ++- src/afs/afs_dynroot.c | 2 +- src/afs/afs_lock.c | 5 +- src/afs/afs_nfsclnt.c | 30 ++++--- src/afs/afs_osi.c | 2 +- src/afs/afs_pioctl.c | 80 +++++++---------- src/afs/afs_prototypes.h | 185 ++++++++++++++++++++++++++++++++------ src/afs/exporter.h | 27 ++++-- 28 files changed, 352 insertions(+), 280 deletions(-) diff --git a/src/afs/DARWIN/osi_inode.c b/src/afs/DARWIN/osi_inode.c index ddecc6c..35b1dc3 100644 --- a/src/afs/DARWIN/osi_inode.c +++ b/src/afs/DARWIN/osi_inode.c @@ -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; } diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index c5ae14e..e9840f6 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -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 { diff --git a/src/afs/LINUX/osi_alloc.c b/src/afs/LINUX/osi_alloc.c index e31d81e..fcde30a 100644 --- a/src/afs/LINUX/osi_alloc.c +++ b/src/afs/LINUX/osi_alloc.c @@ -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; diff --git a/src/afs/LINUX/osi_inode.c b/src/afs/LINUX/osi_inode.c index 36d4c2a..d6764e9 100644 --- a/src/afs/LINUX/osi_inode.c +++ b/src/afs/LINUX/osi_inode.c @@ -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; } diff --git a/src/afs/LINUX/osi_syscall.c b/src/afs/LINUX/osi_syscall.c index 4b36b76..5be011a 100644 --- a/src/afs/LINUX/osi_syscall.c +++ b/src/afs/LINUX/osi_syscall.c @@ -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 diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 4910004..b3985e3 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -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; diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 7f15ca4..0352b94 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -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; diff --git a/src/afs/UKERNEL/osi_vnodeops.c b/src/afs/UKERNEL/osi_vnodeops.c index edd02b7..2e325ec 100644 --- a/src/afs/UKERNEL/osi_vnodeops.c +++ b/src/afs/UKERNEL/osi_vnodeops.c @@ -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) diff --git a/src/afs/UKERNEL/sysincludes.h b/src/afs/UKERNEL/sysincludes.h index ab6d449..7a1e118 100644 --- a/src/afs/UKERNEL/sysincludes.h +++ b/src/afs/UKERNEL/sysincludes.h @@ -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[]; diff --git a/src/afs/VNOPS/afs_vnop_access.c b/src/afs/VNOPS/afs_vnop_access.c index 25fae9e..5c65c65 100644 --- a/src/afs/VNOPS/afs_vnop_access.c +++ b/src/afs/VNOPS/afs_vnop_access.c @@ -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); diff --git a/src/afs/VNOPS/afs_vnop_attrs.c b/src/afs/VNOPS/afs_vnop_attrs.c index 7ee49a6..cd0ddb9 100644 --- a/src/afs/VNOPS/afs_vnop_attrs.c +++ b/src/afs/VNOPS/afs_vnop_attrs.c @@ -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); diff --git a/src/afs/VNOPS/afs_vnop_create.c b/src/afs/VNOPS/afs_vnop_create.c index 461a4d2..2127a9b 100644 --- a/src/afs/VNOPS/afs_vnop_create.c +++ b/src/afs/VNOPS/afs_vnop_create.c @@ -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; diff --git a/src/afs/VNOPS/afs_vnop_link.c b/src/afs/VNOPS/afs_vnop_link.c index 4350af4..5a3a6c2 100644 --- a/src/afs/VNOPS/afs_vnop_link.c +++ b/src/afs/VNOPS/afs_vnop_link.c @@ -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; diff --git a/src/afs/VNOPS/afs_vnop_readdir.c b/src/afs/VNOPS/afs_vnop_readdir.c index 025c8b9..0b4299f 100644 --- a/src/afs/VNOPS/afs_vnop_readdir.c +++ b/src/afs/VNOPS/afs_vnop_readdir.c @@ -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; diff --git a/src/afs/VNOPS/afs_vnop_remove.c b/src/afs/VNOPS/afs_vnop_remove.c index 3d546a4..36cdf7b 100644 --- a/src/afs/VNOPS/afs_vnop_remove.c +++ b/src/afs/VNOPS/afs_vnop_remove.c @@ -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; diff --git a/src/afs/VNOPS/afs_vnop_strategy.c b/src/afs/VNOPS/afs_vnop_strategy.c index 766c2da..54cfc65 100644 --- a/src/afs/VNOPS/afs_vnop_strategy.c +++ b/src/afs/VNOPS/afs_vnop_strategy.c @@ -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; diff --git a/src/afs/VNOPS/afs_vnop_symlink.c b/src/afs/VNOPS/afs_vnop_symlink.c index 23425b5..7208655 100644 --- a/src/afs/VNOPS/afs_vnop_symlink.c +++ b/src/afs/VNOPS/afs_vnop_symlink.c @@ -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; diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 5b08d42..6a1f9b5 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -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; diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index 5ebce8e..97c9655 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -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) diff --git a/src/afs/afs_cell.c b/src/afs/afs_cell.c index 54ecfb8..8bcfd39 100644 --- a/src/afs/afs_cell.c +++ b/src/afs/afs_cell.c @@ -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) { AFS_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; diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 7663d70..f8ccc06 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -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, diff --git a/src/afs/afs_dynroot.c b/src/afs/afs_dynroot.c index 76e5ce8..9c846aa 100644 --- a/src/afs/afs_dynroot.c +++ b/src/afs/afs_dynroot.c @@ -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]; diff --git a/src/afs/afs_lock.c b/src/afs/afs_lock.c index 8573a07..80835db 100644 --- a/src/afs/afs_lock.c +++ b/src/afs/afs_lock.c @@ -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) diff --git a/src/afs/afs_nfsclnt.c b/src/afs/afs_nfsclnt.c index a4c898f..13424fd 100644 --- a/src/afs/afs_nfsclnt.c +++ b/src/afs/afs_nfsclnt.c @@ -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; } diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index 79493ef..8c40c79 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -171,7 +171,7 @@ afs_osi_MaskUserLoop() } void -afs_osi_UnmaskUserLoop() +afs_osi_UnmaskUserLoop(void) { #ifdef AFS_DARWIN_ENV afs_osi_fullSigRestore(); diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index d5a5df1..f3b5045 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -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; diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index c3d4a6e..941c86b 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -550,7 +550,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) @@ -627,10 +634,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; @@ -697,6 +715,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 */ @@ -737,7 +756,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); @@ -1013,14 +1044,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, @@ -1041,9 +1114,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, @@ -1070,29 +1155,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, @@ -1105,21 +1216,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; diff --git a/src/afs/exporter.h b/src/afs/exporter.h index b3ca0c9..9e461c2 100644 --- a/src/afs/exporter.h +++ b/src/afs/exporter.h @@ -50,15 +50,26 @@ #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 { -- 1.9.4