ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / linux / ioctl32.h
1 #ifndef IOCTL32_H
2 #define IOCTL32_H 1
3
4 struct file;
5
6 /* 
7  * Register an 32bit ioctl translation handler for ioctl cmd.
8  *
9  * handler == NULL: use 64bit ioctl handler.
10  * arguments to handler:  fd: file descriptor
11  *                        cmd: ioctl command.
12  *                        arg: ioctl argument
13  *                        struct file *file: file descriptor pointer.
14  */ 
15
16 extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *));
17
18 extern int unregister_ioctl32_conversion(unsigned int cmd);
19
20 typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
21
22 struct ioctl_trans {
23         unsigned long cmd;
24         ioctl_trans_handler_t handler;
25         struct ioctl_trans *next;
26 };
27
28 #endif