diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/s390/kernel/compat_ioctl.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/s390/kernel/compat_ioctl.c')
-rw-r--r-- | arch/s390/kernel/compat_ioctl.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/arch/s390/kernel/compat_ioctl.c b/arch/s390/kernel/compat_ioctl.c new file mode 100644 index 000000000000..96571ff7115d --- /dev/null +++ b/arch/s390/kernel/compat_ioctl.c | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * ioctl32.c: Conversion between 32bit and 64bit native ioctls. | ||
3 | * | ||
4 | * S390 version | ||
5 | * Copyright (C) 2000-2003 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
6 | * Author(s): Gerhard Tonn (ton@de.ibm.com) | ||
7 | * Arnd Bergmann (arndb@de.ibm.com) | ||
8 | * | ||
9 | * Original implementation from 32-bit Sparc compat code which is | ||
10 | * Copyright (C) 2000 Silicon Graphics, Inc. | ||
11 | * Written by Ulf Carlsson (ulfc@engr.sgi.com) | ||
12 | */ | ||
13 | |||
14 | #include "compat_linux.h" | ||
15 | #define INCLUDES | ||
16 | #define CODE | ||
17 | #include "../../../fs/compat_ioctl.c" | ||
18 | #include <asm/dasd.h> | ||
19 | #include <asm/tape390.h> | ||
20 | |||
21 | static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd, | ||
22 | unsigned long arg, struct file *f) | ||
23 | { | ||
24 | return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); | ||
25 | } | ||
26 | |||
27 | static int do_ioctl32_ulong(unsigned int fd, unsigned int cmd, | ||
28 | unsigned long arg, struct file *f) | ||
29 | { | ||
30 | return sys_ioctl(fd, cmd, arg); | ||
31 | } | ||
32 | |||
33 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)do_ioctl32_pointer) | ||
34 | #define ULONG_IOCTL(cmd) HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)do_ioctl32_ulong) | ||
35 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL }, | ||
36 | |||
37 | struct ioctl_trans ioctl_start[] = { | ||
38 | /* architecture independent ioctls */ | ||
39 | #include <linux/compat_ioctl.h> | ||
40 | #define DECLARES | ||
41 | #include "../../../fs/compat_ioctl.c" | ||
42 | |||
43 | /* s390 only ioctls */ | ||
44 | #if defined(CONFIG_DASD) || defined(CONFIG_DASD_MODULE) | ||
45 | COMPATIBLE_IOCTL(DASDAPIVER) | ||
46 | COMPATIBLE_IOCTL(BIODASDDISABLE) | ||
47 | COMPATIBLE_IOCTL(BIODASDENABLE) | ||
48 | COMPATIBLE_IOCTL(BIODASDRSRV) | ||
49 | COMPATIBLE_IOCTL(BIODASDRLSE) | ||
50 | COMPATIBLE_IOCTL(BIODASDSLCK) | ||
51 | COMPATIBLE_IOCTL(BIODASDINFO) | ||
52 | COMPATIBLE_IOCTL(BIODASDINFO2) | ||
53 | COMPATIBLE_IOCTL(BIODASDFMT) | ||
54 | COMPATIBLE_IOCTL(BIODASDPRRST) | ||
55 | COMPATIBLE_IOCTL(BIODASDQUIESCE) | ||
56 | COMPATIBLE_IOCTL(BIODASDRESUME) | ||
57 | COMPATIBLE_IOCTL(BIODASDPRRD) | ||
58 | COMPATIBLE_IOCTL(BIODASDPSRD) | ||
59 | COMPATIBLE_IOCTL(BIODASDGATTR) | ||
60 | COMPATIBLE_IOCTL(BIODASDSATTR) | ||
61 | |||
62 | #endif | ||
63 | |||
64 | #if defined(CONFIG_S390_TAPE) || defined(CONFIG_S390_TAPE_MODULE) | ||
65 | COMPATIBLE_IOCTL(TAPE390_DISPLAY) | ||
66 | #endif | ||
67 | |||
68 | /* s390 doesn't need handlers here */ | ||
69 | COMPATIBLE_IOCTL(TIOCGSERIAL) | ||
70 | COMPATIBLE_IOCTL(TIOCSSERIAL) | ||
71 | }; | ||
72 | |||
73 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); | ||