diff --git a/src/afs/FBSD/osi_vfsops.c b/src/afs/FBSD/osi_vfsops.c index 6044bbed17..8a979db6d7 100644 --- a/src/afs/FBSD/osi_vfsops.c +++ b/src/afs/FBSD/osi_vfsops.c @@ -18,7 +18,6 @@ struct mount *afs_globalVFS = NULL; int afs_pbuf_freecnt = -1; extern int Afs_xsetgroups(); -extern int afs_xioctl(); static struct syscall_helper_data afs_syscalls[] = { { diff --git a/src/afs/HPUX/osi_vfsops.c b/src/afs/HPUX/osi_vfsops.c index 0ddc227c78..46faca7433 100644 --- a/src/afs/HPUX/osi_vfsops.c +++ b/src/afs/HPUX/osi_vfsops.c @@ -290,7 +290,7 @@ int afs_vfs_slot = -1; afsc_link() { - extern int Afs_syscall(), afs_xioctl(), Afs_xsetgroups(); + extern int Afs_syscall(), Afs_xsetgroups(); /* For now nothing special is required during AFS initialization. */ AFS_STATCNT(afsc_link); diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 08fccb1b2e..8aeeafa9b2 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -613,10 +613,6 @@ out1: } -/* in afs_pioctl.c */ -extern int afs_xioctl(struct inode *ip, struct file *fp, unsigned int com, - unsigned long arg); - static long afs_unlocked_xioctl(struct file *fp, unsigned int com, unsigned long arg) { return afs_xioctl(FILE_INODE(fp), fp, com, arg); diff --git a/src/afs/NBSD/osi_kmod.c b/src/afs/NBSD/osi_kmod.c index f6585651e2..eefaf5617c 100644 --- a/src/afs/NBSD/osi_kmod.c +++ b/src/afs/NBSD/osi_kmod.c @@ -44,7 +44,6 @@ #include "afs/afsincludes.h" /* Afs-based standard headers */ extern int afs3_syscall(struct lwp *, const void *, register_t *); -extern int afs_xioctl(struct lwp *, const void *, register_t *); extern int Afs_xsetgroups(struct lwp *, const void *, register_t *); #if !defined(AFS_NBSD60_ENV) diff --git a/src/afs/NBSD/osi_vfsops.c b/src/afs/NBSD/osi_vfsops.c index 7679ff1695..5032a1dd9e 100644 --- a/src/afs/NBSD/osi_vfsops.c +++ b/src/afs/NBSD/osi_vfsops.c @@ -110,7 +110,6 @@ VFS_PROTOS(afs); #ifndef AFS_NBSD60_ENV extern int sys_lkmnosys(struct lwp *, const void *, register_t *); extern int afs3_syscall(struct lwp *, const void *, register_t *); -extern int afs_xioctl(struct lwp *, const void *, register_t *); extern int Afs_xsetgroups(struct lwp *, const void *, register_t *); static int afs_badcall(struct lwp *, const void *, register_t *); diff --git a/src/afs/OBSD/osi_vfsops.c b/src/afs/OBSD/osi_vfsops.c index 830906cc38..e7729261ea 100644 --- a/src/afs/OBSD/osi_vfsops.c +++ b/src/afs/OBSD/osi_vfsops.c @@ -108,7 +108,7 @@ NONINFRINGEMENT. /* from /usr/src/sys/kern/vfs_subr.c */ extern void insmntque(struct vnode *, struct mount *); -extern int sys_lkmnosys(), afs_xioctl(), Afs_xsetgroups(); +extern int sys_lkmnosys(), Afs_xsetgroups(); static int lkmid = -1; static int afs_badcall(struct proc *p, void *xx, register_t * yy); diff --git a/src/afs/SOLARIS/osi_vfsops.c b/src/afs/SOLARIS/osi_vfsops.c index c6c9ddf565..f3f9bd33c9 100644 --- a/src/afs/SOLARIS/osi_vfsops.c +++ b/src/afs/SOLARIS/osi_vfsops.c @@ -389,7 +389,6 @@ afsinit(int fstype, char *dummy) afsinit(struct vfssw *vfsswp, int fstype) #endif { - extern int afs_xioctl(); extern int afs_xsetgroups(); AFS_STATCNT(afsinit); diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index 9b3b1afec9..d7894dd674 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -812,6 +812,23 @@ extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, extern int HandleIoctl(struct vcache *avc, afs_int32 acom, struct afs_ioctl *adata); +#if defined(AFS_SUN5_ENV) +struct afs_ioctl_sys; +extern int afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp); +#elif defined(AFS_LINUX_ENV) +extern int afs_xioctl(struct inode *ip, struct file *fp, unsigned int com, unsigned long arg); +#elif defined(AFS_DAWRIN_ENV) & !defined(AFS_DARWIN80) +extern int afs_xioctl(afs_proc_t *p, struct ioctl_args *uap, register_t *retval); +#elif defined(AFS_FBSD_ENV) +extern int afs_xioctl(struct thread *td, struct ioctl_args *uap, register_t *retval); +#elif defined(AFS_NBSD_ENV) +extern int afs_xioctl(afs_proc_t *p, const struct sys_ioctl_args *uap, register_t *retval); +#elif defined(AFS_XBSD_ENV) +extern int afs_xioctl(afs_proc_t *p, const struct ioctl_args *uap, register_t *retval); +#elif defined(UKERNEL) +extern int afs_xioctl(void); +#endif + /* afs_segments.c */ extern int afs_StoreAllSegments(struct vcache *avc,