X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fioctl32.h;h=e8c4af32b3bb6ddcbd2005aa57a776d79216aef5;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=e5bff65d307440bbe6e7669dcddb6d3a3802f48b;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/linux/ioctl32.h b/include/linux/ioctl32.h index e5bff65d3..e8c4af32b 100644 --- a/include/linux/ioctl32.h +++ b/include/linux/ioctl32.h @@ -1,8 +1,19 @@ #ifndef IOCTL32_H #define IOCTL32_H 1 +#include /* for __deprecated */ + struct file; +typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, + unsigned long, struct file *); + +struct ioctl_trans { + unsigned long cmd; + ioctl_trans_handler_t handler; + struct ioctl_trans *next; +}; + /* * Register an 32bit ioctl translation handler for ioctl cmd. * @@ -13,16 +24,16 @@ struct file; * struct file *file: file descriptor pointer. */ -extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *)); +#ifdef CONFIG_COMPAT +extern int __deprecated register_ioctl32_conversion(unsigned int cmd, + ioctl_trans_handler_t handler); +extern int __deprecated unregister_ioctl32_conversion(unsigned int cmd); -extern int unregister_ioctl32_conversion(unsigned int cmd); +#else -typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); +#define register_ioctl32_conversion(cmd, handler) ({ 0; }) +#define unregister_ioctl32_conversion(cmd) ({ 0; }) -struct ioctl_trans { - unsigned long cmd; - ioctl_trans_handler_t handler; - struct ioctl_trans *next; -}; +#endif #endif