patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / ppc64 / kernel / ioctl32.c
1 /* 
2  * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
3  * 
4  * Based on sparc64 ioctl32.c by:
5  *
6  * Copyright (C) 1997-2000  Jakub Jelinek  (jakub@redhat.com)
7  * Copyright (C) 1998  Eddie C. Dost  (ecd@skynet.be)
8  *
9  * ppc64 changes:
10  *
11  * Copyright (C) 2000  Ken Aaker (kdaaker@rchland.vnet.ibm.com)
12  * Copyright (C) 2001  Anton Blanchard (antonb@au.ibm.com)
13  *
14  * These routines maintain argument size conversion between 32bit and 64bit
15  * ioctls.
16  *
17  * This program is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU General Public License
19  * as published by the Free Software Foundation; either version
20  * 2 of the License, or (at your option) any later version.
21  */
22
23 #define INCLUDES
24 #include "compat_ioctl.c"
25 #include <linux/ncp_fs.h>
26 #include <linux/syscalls.h>
27 #include <asm/ppc32.h>
28
29 #define CODE
30 #include "compat_ioctl.c"
31
32 #define HANDLE_IOCTL(cmd,handler) { cmd, (ioctl_trans_handler_t)handler, 0 },
33 #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd,sys_ioctl)
34
35 #define IOCTL_TABLE_START \
36         struct ioctl_trans ioctl_start[] = {
37 #define IOCTL_TABLE_END \
38         };
39
40 IOCTL_TABLE_START
41 #include <linux/compat_ioctl.h>
42 #define DECLARES
43 #include "compat_ioctl.c"
44 COMPATIBLE_IOCTL(TCSBRKP)
45 COMPATIBLE_IOCTL(TIOCSTART)
46 COMPATIBLE_IOCTL(TIOCSTOP)
47 COMPATIBLE_IOCTL(TIOCSLTC)
48 /* Little p (/dev/rtc, /dev/envctrl, etc.) */
49 COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
50 COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
51
52 IOCTL_TABLE_END
53
54 int ioctl_table_size = ARRAY_SIZE(ioctl_start);