blob: e8c4af32b3bb6ddcbd2005aa57a776d79216aef5 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef IOCTL32_H
2#define IOCTL32_H 1
3
Christoph Hellwig22a685d2005-04-16 15:25:48 -07004#include <linux/compiler.h> /* for __deprecated */
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006struct file;
7
8typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int,
9 unsigned long, struct file *);
10
11struct 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 Hellwig22a685d2005-04-16 15:25:48 -070028extern int __deprecated register_ioctl32_conversion(unsigned int cmd,
Linus Torvalds1da177e2005-04-16 15:20:36 -070029 ioctl_trans_handler_t handler);
Christoph Hellwig22a685d2005-04-16 15:25:48 -070030extern int __deprecated unregister_ioctl32_conversion(unsigned int cmd);
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
32#else
33
34#define register_ioctl32_conversion(cmd, handler) ({ 0; })
35#define unregister_ioctl32_conversion(cmd) ({ 0; })
36
37#endif
38
39#endif