Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* $Id: ioctl32.c,v 1.5 2002/10/18 00:21:43 varenet 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 | * |
| 7 | * These routines maintain argument size conversion between 32bit and 64bit |
| 8 | * ioctls. |
| 9 | */ |
| 10 | |
| 11 | #include <linux/syscalls.h> |
| 12 | |
| 13 | #define INCLUDES |
| 14 | #include "compat_ioctl.c" |
| 15 | |
| 16 | #include <asm/perf.h> |
| 17 | #include <asm/ioctls.h> |
| 18 | |
| 19 | #define CODE |
| 20 | #include "compat_ioctl.c" |
| 21 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #define HANDLE_IOCTL(cmd, handler) { cmd, (ioctl_trans_handler_t)handler, NULL }, |
| 23 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd, sys_ioctl) |
| 24 | |
| 25 | #define IOCTL_TABLE_START struct ioctl_trans ioctl_start[] = { |
| 26 | #define IOCTL_TABLE_END }; |
| 27 | |
| 28 | IOCTL_TABLE_START |
| 29 | #include <linux/compat_ioctl.h> |
| 30 | |
| 31 | #define DECLARES |
| 32 | #include "compat_ioctl.c" |
| 33 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | /* And these ioctls need translation */ |
| 35 | HANDLE_IOCTL(SIOCGPPPSTATS, dev_ifsioc) |
| 36 | HANDLE_IOCTL(SIOCGPPPCSTATS, dev_ifsioc) |
| 37 | HANDLE_IOCTL(SIOCGPPPVER, dev_ifsioc) |
| 38 | |
| 39 | #if defined(CONFIG_GEN_RTC) |
| 40 | COMPATIBLE_IOCTL(RTC_AIE_ON) |
| 41 | COMPATIBLE_IOCTL(RTC_AIE_OFF) |
| 42 | COMPATIBLE_IOCTL(RTC_UIE_ON) |
| 43 | COMPATIBLE_IOCTL(RTC_UIE_OFF) |
| 44 | COMPATIBLE_IOCTL(RTC_PIE_ON) |
| 45 | COMPATIBLE_IOCTL(RTC_PIE_OFF) |
| 46 | COMPATIBLE_IOCTL(RTC_WIE_ON) |
| 47 | COMPATIBLE_IOCTL(RTC_WIE_OFF) |
| 48 | COMPATIBLE_IOCTL(RTC_ALM_SET) /* struct rtc_time only has ints */ |
| 49 | COMPATIBLE_IOCTL(RTC_ALM_READ) /* struct rtc_time only has ints */ |
| 50 | COMPATIBLE_IOCTL(RTC_RD_TIME) /* struct rtc_time only has ints */ |
| 51 | COMPATIBLE_IOCTL(RTC_SET_TIME) /* struct rtc_time only has ints */ |
| 52 | HANDLE_IOCTL(RTC_IRQP_READ, w_long) |
| 53 | COMPATIBLE_IOCTL(RTC_IRQP_SET) |
| 54 | HANDLE_IOCTL(RTC_EPOCH_READ, w_long) |
| 55 | COMPATIBLE_IOCTL(RTC_EPOCH_SET) |
| 56 | #endif |
| 57 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | IOCTL_TABLE_END |
| 59 | |
| 60 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); |