Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* $Id: ioctl32.c,v 1.136 2002/01/14 09:49:52 davem Exp $ |
| 2 | * ioctl32.c: Conversion between 32bit and 64bit native ioctls. |
| 3 | * |
| 4 | * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) |
| 5 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
| 6 | * Copyright (C) 2003 Pavel Machek (pavel@suse.cz) |
| 7 | * |
| 8 | * These routines maintain argument size conversion between 32bit and 64bit |
| 9 | * ioctls. |
| 10 | */ |
| 11 | |
| 12 | #define INCLUDES |
| 13 | #include "compat_ioctl.c" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | #include <linux/syscalls.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #define CODE |
| 17 | #include "compat_ioctl.c" |
| 18 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) |
Christoph Hellwig | 7e4c54a | 2005-11-08 21:35:07 -0800 | [diff] [blame] | 20 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #define IOCTL_TABLE_START \ |
| 22 | struct ioctl_trans ioctl_start[] = { |
| 23 | #define IOCTL_TABLE_END \ |
| 24 | }; |
| 25 | |
| 26 | IOCTL_TABLE_START |
| 27 | #include <linux/compat_ioctl.h> |
| 28 | #define DECLARES |
| 29 | #include "compat_ioctl.c" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | #if 0 |
| 31 | HANDLE_IOCTL(RTC32_IRQP_READ, do_rtc_ioctl) |
| 32 | HANDLE_IOCTL(RTC32_IRQP_SET, do_rtc_ioctl) |
| 33 | HANDLE_IOCTL(RTC32_EPOCH_READ, do_rtc_ioctl) |
| 34 | HANDLE_IOCTL(RTC32_EPOCH_SET, do_rtc_ioctl) |
| 35 | #endif |
| 36 | /* take care of sizeof(sizeof()) breakage */ |
| 37 | IOCTL_TABLE_END |
| 38 | |
| 39 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); |