forked from pool/openafs
cfa65eea8c
- update to openafs-1.8.11 - apply upstream patches for kernel 6.8 * 056a7a8.diff * 05ac614.diff * 073adec.diff * 0d9f6cf.diff * 0e983a9.diff * 112fb94.diff * 1e1bf8e.diff * 2056ce8.diff * 5312d06.diff * 67e48c8.diff * 6b20756.diff * 743d72f.diff * 7cae97b.diff * 81b910a.diff * 87ab04a.diff * 9f052c1.diff * a14a9ad.diff * a87845d.diff * aae8b00.diff * b77b304.diff * d1c89ac.diff * d9f3a2c.diff * db91384.diff * dffd0e1.diff * e0f425a.diff * e157f8f.diff * e428053.diff * ef7b8c5.diff * f5bafb0.diff * fca6fd9.diff OBS-URL: https://build.opensuse.org/request/show/1170220 OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=123
151 lines
5.4 KiB
Diff
151 lines
5.4 KiB
Diff
From dffd0e1475f9fb346a146607335c9f9d847d4429 Mon Sep 17 00:00:00 2001
|
|
From: Cheyenne Wills <cwills@sinenomine.net>
|
|
Date: Mon, 12 Feb 2024 08:59:32 -0700
|
|
Subject: [PATCH] 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
|
|
---
|
|
|
|
diff --git a/src/afs/FBSD/osi_vfsops.c b/src/afs/FBSD/osi_vfsops.c
|
|
index 6044bbe..8a979db 100644
|
|
--- a/src/afs/FBSD/osi_vfsops.c
|
|
+++ b/src/afs/FBSD/osi_vfsops.c
|
|
@@ -18,7 +18,6 @@
|
|
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 0ddc227..46faca7 100644
|
|
--- a/src/afs/HPUX/osi_vfsops.c
|
|
+++ b/src/afs/HPUX/osi_vfsops.c
|
|
@@ -290,7 +290,7 @@
|
|
|
|
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 08fccb1..8aeeafa 100644
|
|
--- a/src/afs/LINUX/osi_vnodeops.c
|
|
+++ b/src/afs/LINUX/osi_vnodeops.c
|
|
@@ -613,10 +613,6 @@
|
|
}
|
|
|
|
|
|
-/* 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 f658565..eefaf56 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 7679ff1..5032a1d 100644
|
|
--- a/src/afs/NBSD/osi_vfsops.c
|
|
+++ b/src/afs/NBSD/osi_vfsops.c
|
|
@@ -110,7 +110,6 @@
|
|
#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 830906c..e772926 100644
|
|
--- a/src/afs/OBSD/osi_vfsops.c
|
|
+++ b/src/afs/OBSD/osi_vfsops.c
|
|
@@ -108,7 +108,7 @@
|
|
/* 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 c6c9ddf..f3f9bd3 100644
|
|
--- a/src/afs/SOLARIS/osi_vfsops.c
|
|
+++ b/src/afs/SOLARIS/osi_vfsops.c
|
|
@@ -389,7 +389,6 @@
|
|
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 9b3b1af..d7894dd 100644
|
|
--- a/src/afs/afs_prototypes.h
|
|
+++ b/src/afs/afs_prototypes.h
|
|
@@ -812,6 +812,23 @@
|
|
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,
|