#include <asm/ia32_unistd.h>
#endif
-#if defined(AFS_SPARC64_LINUX26_ENV) && defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
-#include <linux/ioctl32.h>
-#endif
-
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/sched.h>
#include "osi_compat.h"
extern struct proc_dir_entry *openafs_procfs;
-#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
-static int ioctl32_done;
-#endif
extern asmlinkage long
afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
}
}
-#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
static long afs_unlocked_ioctl(struct file *file, unsigned int cmd,
unsigned long arg) {
return afs_ioctl(FILE_INODE(file), file, cmd, arg);
}
-#endif
+
#if defined(HAVE_LINUX_STRUCT_PROC_OPS)
static struct proc_ops afs_syscall_ops = {
.proc_ioctl = afs_unlocked_ioctl,
};
#else
static struct file_operations afs_syscall_ops = {
-# ifdef HAVE_UNLOCKED_IOCTL
.unlocked_ioctl = afs_unlocked_ioctl,
-# else
- .ioctl = afs_ioctl,
-# endif
-# ifdef HAVE_COMPAT_IOCTL
.compat_ioctl = afs_unlocked_ioctl,
-# endif
};
#endif /* HAVE_LINUX_STRUCT_PROC_OPS */
+
void
osi_ioctl_init(void)
{
entry->owner = THIS_MODULE;
#endif
-#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
- if (register_ioctl32_conversion(VIOC_SYSCALL32, NULL) == 0)
- ioctl32_done = 1;
-#endif
}
void
osi_ioctl_clean(void)
{
remove_proc_entry(PROC_SYSCALL_NAME, openafs_procfs);
-#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
- if (ioctl32_done)
- unregister_ioctl32_conversion(VIOC_SYSCALL32);
-#endif
}
extern int afs_xioctl(struct inode *ip, struct file *fp, unsigned int com,
unsigned long arg);
-#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
static long afs_unlocked_xioctl(struct file *fp, unsigned int com,
unsigned long arg) {
return afs_xioctl(FILE_INODE(fp), fp, com, arg);
}
-#endif
static int
#else
.readdir = afs_linux_readdir,
#endif
-#ifdef HAVE_UNLOCKED_IOCTL
.unlocked_ioctl = afs_unlocked_xioctl,
-#else
- .ioctl = afs_xioctl,
-#endif
-#ifdef HAVE_COMPAT_IOCTL
.compat_ioctl = afs_unlocked_xioctl,
-#endif
.open = afs_linux_open,
.release = afs_linux_release,
.llseek = default_llseek,
.read = afs_linux_read,
.write = afs_linux_write,
#endif
-#ifdef HAVE_UNLOCKED_IOCTL
.unlocked_ioctl = afs_unlocked_xioctl,
-#else
- .ioctl = afs_xioctl,
-#endif
-#ifdef HAVE_COMPAT_IOCTL
.compat_ioctl = afs_unlocked_xioctl,
-#endif
.mmap = afs_linux_mmap,
.open = afs_linux_open,
.flush = afs_linux_flush,