mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
afs: Add afs_xioctl prototyes to afs_prototypes.h
Several .c files have external function prototypes for the afs_xioctl function, while the implementing files do not have the prototype. Move these prototypes into afs_prototypes.h so that the prototypes are available to both the caller and the implementation. Because the file holding the implementation does not have a prototypes, afs_xioctl() is being flagged when building against a Linux 6.8 kernel (which sets the -Wmissing-declarations and -Wmissing-prototypes compiler flags as default). Linux 6.8 commit: 'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f). When building against a Linux kernel with CONFIG_WERROR=y, the build fails. Note that the function afs_xioctl() has platform specific implementations. Reviewed-on: https://gerrit.openafs.org/15643 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> (cherry picked from commit 575d986aa6c18ac27ea42fb66ae8b8cb0e27fe6c) Change-Id: If746111fdcf6a00459f524711623d322d5fc7942 Reviewed-on: https://gerrit.openafs.org/15696 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
c04c2d0722
commit
96932160fa
@ -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[] = {
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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 *);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user