diff options
-rw-r--r-- | fs/compat_ioctl.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index f07e60f9e102..991c00de5c4e 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -49,6 +49,8 @@ | |||
49 | #include <linux/vt_kern.h> | 49 | #include <linux/vt_kern.h> |
50 | #include <linux/fb.h> | 50 | #include <linux/fb.h> |
51 | #include <linux/ext2_fs.h> | 51 | #include <linux/ext2_fs.h> |
52 | #include <linux/ext3_jbd.h> | ||
53 | #include <linux/ext3_fs.h> | ||
52 | #include <linux/videodev.h> | 54 | #include <linux/videodev.h> |
53 | #include <linux/netdevice.h> | 55 | #include <linux/netdevice.h> |
54 | #include <linux/raw.h> | 56 | #include <linux/raw.h> |
@@ -134,6 +136,15 @@ | |||
134 | /* Aiee. Someone does not find a difference between int and long */ | 136 | /* Aiee. Someone does not find a difference between int and long */ |
135 | #define EXT2_IOC32_GETFLAGS _IOR('f', 1, int) | 137 | #define EXT2_IOC32_GETFLAGS _IOR('f', 1, int) |
136 | #define EXT2_IOC32_SETFLAGS _IOW('f', 2, int) | 138 | #define EXT2_IOC32_SETFLAGS _IOW('f', 2, int) |
139 | #define EXT3_IOC32_GETVERSION _IOR('f', 3, int) | ||
140 | #define EXT3_IOC32_SETVERSION _IOR('f', 4, int) | ||
141 | #define EXT3_IOC32_GETRSVSZ _IOR('f', 5, int) | ||
142 | #define EXT3_IOC32_SETRSVSZ _IOW('f', 6, int) | ||
143 | #define EXT3_IOC32_GROUP_EXTEND _IOW('f', 7, unsigned int) | ||
144 | #ifdef CONFIG_JBD_DEBUG | ||
145 | #define EXT3_IOC32_WAIT_FOR_READONLY _IOR('f', 99, int) | ||
146 | #endif | ||
147 | |||
137 | #define EXT2_IOC32_GETVERSION _IOR('v', 1, int) | 148 | #define EXT2_IOC32_GETVERSION _IOR('v', 1, int) |
138 | #define EXT2_IOC32_SETVERSION _IOW('v', 2, int) | 149 | #define EXT2_IOC32_SETVERSION _IOW('v', 2, int) |
139 | 150 | ||
@@ -180,6 +191,22 @@ static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
180 | return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); | 191 | return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); |
181 | } | 192 | } |
182 | 193 | ||
194 | static int do_ext3_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
195 | { | ||
196 | /* These are just misnamed, they actually get/put from/to user an int */ | ||
197 | switch (cmd) { | ||
198 | case EXT3_IOC32_GETVERSION: cmd = EXT3_IOC_GETVERSION; break; | ||
199 | case EXT3_IOC32_SETVERSION: cmd = EXT3_IOC_SETVERSION; break; | ||
200 | case EXT3_IOC32_GETRSVSZ: cmd = EXT3_IOC_GETRSVSZ; break; | ||
201 | case EXT3_IOC32_SETRSVSZ: cmd = EXT3_IOC_SETRSVSZ; break; | ||
202 | case EXT3_IOC32_GROUP_EXTEND: cmd = EXT3_IOC_GROUP_EXTEND; break; | ||
203 | #ifdef CONFIG_JBD_DEBUG | ||
204 | case EXT3_IOC32_WAIT_FOR_READONLY: cmd = EXT3_IOC_WAIT_FOR_READONLY; break; | ||
205 | #endif | ||
206 | } | ||
207 | return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); | ||
208 | } | ||
209 | |||
183 | struct video_tuner32 { | 210 | struct video_tuner32 { |
184 | compat_int_t tuner; | 211 | compat_int_t tuner; |
185 | char name[32]; | 212 | char name[32]; |
@@ -2981,6 +3008,15 @@ HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl) | |||
2981 | HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl) | 3008 | HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl) |
2982 | HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl) | 3009 | HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl) |
2983 | HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl) | 3010 | HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl) |
3011 | HANDLE_IOCTL(EXT3_IOC32_GETVERSION, do_ext3_ioctl) | ||
3012 | HANDLE_IOCTL(EXT3_IOC32_SETVERSION, do_ext3_ioctl) | ||
3013 | HANDLE_IOCTL(EXT3_IOC32_GETRSVSZ, do_ext3_ioctl) | ||
3014 | HANDLE_IOCTL(EXT3_IOC32_SETRSVSZ, do_ext3_ioctl) | ||
3015 | HANDLE_IOCTL(EXT3_IOC32_GROUP_EXTEND, do_ext3_ioctl) | ||
3016 | COMPATIBLE_IOCTL(EXT3_IOC_GROUP_ADD) | ||
3017 | #ifdef CONFIG_JBD_DEBUG | ||
3018 | HANDLE_IOCTL(EXT3_IOC32_WAIT_FOR_READONLY, do_ext3_ioctl) | ||
3019 | #endif | ||
2984 | HANDLE_IOCTL(VIDIOCGTUNER32, do_video_ioctl) | 3020 | HANDLE_IOCTL(VIDIOCGTUNER32, do_video_ioctl) |
2985 | HANDLE_IOCTL(VIDIOCSTUNER32, do_video_ioctl) | 3021 | HANDLE_IOCTL(VIDIOCSTUNER32, do_video_ioctl) |
2986 | HANDLE_IOCTL(VIDIOCGWIN32, do_video_ioctl) | 3022 | HANDLE_IOCTL(VIDIOCGWIN32, do_video_ioctl) |