Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef IOCTL32_H |
| 2 | #define IOCTL32_H 1 |
| 3 | |
Christoph Hellwig | 22a685d | 2005-04-16 15:25:48 -0700 | [diff] [blame] | 4 | #include <linux/compiler.h> /* for __deprecated */ |
| 5 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | struct file; |
| 7 | |
| 8 | typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, |
| 9 | unsigned long, struct file *); |
| 10 | |
| 11 | struct ioctl_trans { |
| 12 | unsigned long cmd; |
| 13 | ioctl_trans_handler_t handler; |
| 14 | struct ioctl_trans *next; |
| 15 | }; |
| 16 | |
| 17 | /* |
| 18 | * Register an 32bit ioctl translation handler for ioctl cmd. |
| 19 | * |
| 20 | * handler == NULL: use 64bit ioctl handler. |
| 21 | * arguments to handler: fd: file descriptor |
| 22 | * cmd: ioctl command. |
| 23 | * arg: ioctl argument |
| 24 | * struct file *file: file descriptor pointer. |
| 25 | */ |
| 26 | |
| 27 | #ifdef CONFIG_COMPAT |
Christoph Hellwig | 22a685d | 2005-04-16 15:25:48 -0700 | [diff] [blame] | 28 | extern int __deprecated register_ioctl32_conversion(unsigned int cmd, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | ioctl_trans_handler_t handler); |
Christoph Hellwig | 22a685d | 2005-04-16 15:25:48 -0700 | [diff] [blame] | 30 | extern int __deprecated unregister_ioctl32_conversion(unsigned int cmd); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | |
| 32 | #else |
| 33 | |
| 34 | #define register_ioctl32_conversion(cmd, handler) ({ 0; }) |
| 35 | #define unregister_ioctl32_conversion(cmd) ({ 0; }) |
| 36 | |
| 37 | #endif |
| 38 | |
| 39 | #endif |