diff options
Diffstat (limited to 'fs/compat_ioctl.c')
| -rw-r--r-- | fs/compat_ioctl.c | 395 |
1 files changed, 133 insertions, 262 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 43a2508ac696..5dd0207ffd46 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | * ioctls. | 10 | * ioctls. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #ifdef INCLUDES | ||
| 14 | #include <linux/config.h> | 13 | #include <linux/config.h> |
| 15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 16 | #include <linux/compat.h> | 15 | #include <linux/compat.h> |
| 17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 17 | #include <linux/capability.h> | ||
| 18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
| 19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
| 20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
| @@ -81,13 +81,9 @@ | |||
| 81 | #include <linux/capi.h> | 81 | #include <linux/capi.h> |
| 82 | 82 | ||
| 83 | #include <scsi/scsi.h> | 83 | #include <scsi/scsi.h> |
| 84 | /* Ugly hack. */ | ||
| 85 | #undef __KERNEL__ | ||
| 86 | #include <scsi/scsi_ioctl.h> | 84 | #include <scsi/scsi_ioctl.h> |
| 87 | #define __KERNEL__ | ||
| 88 | #include <scsi/sg.h> | 85 | #include <scsi/sg.h> |
| 89 | 86 | ||
| 90 | #include <asm/types.h> | ||
| 91 | #include <asm/uaccess.h> | 87 | #include <asm/uaccess.h> |
| 92 | #include <linux/ethtool.h> | 88 | #include <linux/ethtool.h> |
| 93 | #include <linux/mii.h> | 89 | #include <linux/mii.h> |
| @@ -95,7 +91,6 @@ | |||
| 95 | #include <linux/watchdog.h> | 91 | #include <linux/watchdog.h> |
| 96 | #include <linux/dm-ioctl.h> | 92 | #include <linux/dm-ioctl.h> |
| 97 | 93 | ||
| 98 | #include <asm/module.h> | ||
| 99 | #include <linux/soundcard.h> | 94 | #include <linux/soundcard.h> |
| 100 | #include <linux/lp.h> | 95 | #include <linux/lp.h> |
| 101 | #include <linux/ppdev.h> | 96 | #include <linux/ppdev.h> |
| @@ -127,11 +122,7 @@ | |||
| 127 | #include <linux/dvb/dmx.h> | 122 | #include <linux/dvb/dmx.h> |
| 128 | #include <linux/dvb/frontend.h> | 123 | #include <linux/dvb/frontend.h> |
| 129 | #include <linux/dvb/video.h> | 124 | #include <linux/dvb/video.h> |
| 130 | 125 | #include <linux/lp.h> | |
| 131 | #undef INCLUDES | ||
| 132 | #endif | ||
| 133 | |||
| 134 | #ifdef CODE | ||
| 135 | 126 | ||
| 136 | /* Aiee. Someone does not find a difference between int and long */ | 127 | /* Aiee. Someone does not find a difference between int and long */ |
| 137 | #define EXT2_IOC32_GETFLAGS _IOR('f', 1, int) | 128 | #define EXT2_IOC32_GETFLAGS _IOR('f', 1, int) |
| @@ -148,6 +139,12 @@ | |||
| 148 | #define EXT2_IOC32_GETVERSION _IOR('v', 1, int) | 139 | #define EXT2_IOC32_GETVERSION _IOR('v', 1, int) |
| 149 | #define EXT2_IOC32_SETVERSION _IOW('v', 2, int) | 140 | #define EXT2_IOC32_SETVERSION _IOW('v', 2, int) |
| 150 | 141 | ||
| 142 | static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd, | ||
| 143 | unsigned long arg, struct file *f) | ||
| 144 | { | ||
| 145 | return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); | ||
| 146 | } | ||
| 147 | |||
| 151 | static int w_long(unsigned int fd, unsigned int cmd, unsigned long arg) | 148 | static int w_long(unsigned int fd, unsigned int cmd, unsigned long arg) |
| 152 | { | 149 | { |
| 153 | mm_segment_t old_fs = get_fs(); | 150 | mm_segment_t old_fs = get_fs(); |
| @@ -207,244 +204,6 @@ static int do_ext3_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
| 207 | return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); | 204 | return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); |
| 208 | } | 205 | } |
| 209 | 206 | ||
| 210 | struct video_tuner32 { | ||
| 211 | compat_int_t tuner; | ||
| 212 | char name[32]; | ||
| 213 | compat_ulong_t rangelow, rangehigh; | ||
| 214 | u32 flags; /* It is really u32 in videodev.h */ | ||
| 215 | u16 mode, signal; | ||
| 216 | }; | ||
| 217 | |||
| 218 | static int get_video_tuner32(struct video_tuner *kp, struct video_tuner32 __user *up) | ||
| 219 | { | ||
| 220 | int i; | ||
| 221 | |||
| 222 | if(get_user(kp->tuner, &up->tuner)) | ||
| 223 | return -EFAULT; | ||
| 224 | for(i = 0; i < 32; i++) | ||
| 225 | __get_user(kp->name[i], &up->name[i]); | ||
| 226 | __get_user(kp->rangelow, &up->rangelow); | ||
| 227 | __get_user(kp->rangehigh, &up->rangehigh); | ||
| 228 | __get_user(kp->flags, &up->flags); | ||
| 229 | __get_user(kp->mode, &up->mode); | ||
| 230 | __get_user(kp->signal, &up->signal); | ||
| 231 | return 0; | ||
| 232 | } | ||
| 233 | |||
| 234 | static int put_video_tuner32(struct video_tuner *kp, struct video_tuner32 __user *up) | ||
| 235 | { | ||
| 236 | int i; | ||
| 237 | |||
| 238 | if(put_user(kp->tuner, &up->tuner)) | ||
| 239 | return -EFAULT; | ||
| 240 | for(i = 0; i < 32; i++) | ||
| 241 | __put_user(kp->name[i], &up->name[i]); | ||
| 242 | __put_user(kp->rangelow, &up->rangelow); | ||
| 243 | __put_user(kp->rangehigh, &up->rangehigh); | ||
| 244 | __put_user(kp->flags, &up->flags); | ||
| 245 | __put_user(kp->mode, &up->mode); | ||
| 246 | __put_user(kp->signal, &up->signal); | ||
| 247 | return 0; | ||
| 248 | } | ||
| 249 | |||
| 250 | struct video_buffer32 { | ||
| 251 | compat_caddr_t base; | ||
| 252 | compat_int_t height, width, depth, bytesperline; | ||
| 253 | }; | ||
| 254 | |||
| 255 | static int get_video_buffer32(struct video_buffer *kp, struct video_buffer32 __user *up) | ||
| 256 | { | ||
| 257 | u32 tmp; | ||
| 258 | |||
| 259 | if (get_user(tmp, &up->base)) | ||
| 260 | return -EFAULT; | ||
| 261 | |||
| 262 | /* This is actually a physical address stored | ||
| 263 | * as a void pointer. | ||
| 264 | */ | ||
| 265 | kp->base = (void *)(unsigned long) tmp; | ||
| 266 | |||
| 267 | __get_user(kp->height, &up->height); | ||
| 268 | __get_user(kp->width, &up->width); | ||
| 269 | __get_user(kp->depth, &up->depth); | ||
| 270 | __get_user(kp->bytesperline, &up->bytesperline); | ||
| 271 | return 0; | ||
| 272 | } | ||
| 273 | |||
| 274 | static int put_video_buffer32(struct video_buffer *kp, struct video_buffer32 __user *up) | ||
| 275 | { | ||
| 276 | u32 tmp = (u32)((unsigned long)kp->base); | ||
| 277 | |||
| 278 | if(put_user(tmp, &up->base)) | ||
| 279 | return -EFAULT; | ||
| 280 | __put_user(kp->height, &up->height); | ||
| 281 | __put_user(kp->width, &up->width); | ||
| 282 | __put_user(kp->depth, &up->depth); | ||
| 283 | __put_user(kp->bytesperline, &up->bytesperline); | ||
| 284 | return 0; | ||
| 285 | } | ||
| 286 | |||
| 287 | struct video_clip32 { | ||
| 288 | s32 x, y, width, height; /* Its really s32 in videodev.h */ | ||
| 289 | compat_caddr_t next; | ||
| 290 | }; | ||
| 291 | |||
| 292 | struct video_window32 { | ||
| 293 | u32 x, y, width, height, chromakey, flags; | ||
| 294 | compat_caddr_t clips; | ||
| 295 | compat_int_t clipcount; | ||
| 296 | }; | ||
| 297 | |||
| 298 | /* You get back everything except the clips... */ | ||
| 299 | static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) | ||
| 300 | { | ||
| 301 | if(put_user(kp->x, &up->x)) | ||
| 302 | return -EFAULT; | ||
| 303 | __put_user(kp->y, &up->y); | ||
| 304 | __put_user(kp->width, &up->width); | ||
| 305 | __put_user(kp->height, &up->height); | ||
| 306 | __put_user(kp->chromakey, &up->chromakey); | ||
| 307 | __put_user(kp->flags, &up->flags); | ||
| 308 | __put_user(kp->clipcount, &up->clipcount); | ||
| 309 | return 0; | ||
| 310 | } | ||
| 311 | |||
| 312 | #define VIDIOCGTUNER32 _IOWR('v',4, struct video_tuner32) | ||
| 313 | #define VIDIOCSTUNER32 _IOW('v',5, struct video_tuner32) | ||
| 314 | #define VIDIOCGWIN32 _IOR('v',9, struct video_window32) | ||
| 315 | #define VIDIOCSWIN32 _IOW('v',10, struct video_window32) | ||
| 316 | #define VIDIOCGFBUF32 _IOR('v',11, struct video_buffer32) | ||
| 317 | #define VIDIOCSFBUF32 _IOW('v',12, struct video_buffer32) | ||
| 318 | #define VIDIOCGFREQ32 _IOR('v',14, u32) | ||
| 319 | #define VIDIOCSFREQ32 _IOW('v',15, u32) | ||
| 320 | |||
| 321 | enum { | ||
| 322 | MaxClips = (~0U-sizeof(struct video_window))/sizeof(struct video_clip) | ||
| 323 | }; | ||
| 324 | |||
| 325 | static int do_set_window(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
| 326 | { | ||
| 327 | struct video_window32 __user *up = compat_ptr(arg); | ||
| 328 | struct video_window __user *vw; | ||
| 329 | struct video_clip __user *p; | ||
| 330 | int nclips; | ||
| 331 | u32 n; | ||
| 332 | |||
| 333 | if (get_user(nclips, &up->clipcount)) | ||
| 334 | return -EFAULT; | ||
| 335 | |||
| 336 | /* Peculiar interface... */ | ||
| 337 | if (nclips < 0) | ||
| 338 | nclips = VIDEO_CLIPMAP_SIZE; | ||
| 339 | |||
| 340 | if (nclips > MaxClips) | ||
| 341 | return -ENOMEM; | ||
| 342 | |||
| 343 | vw = compat_alloc_user_space(sizeof(struct video_window) + | ||
| 344 | nclips * sizeof(struct video_clip)); | ||
| 345 | |||
| 346 | p = nclips ? (struct video_clip __user *)(vw + 1) : NULL; | ||
| 347 | |||
| 348 | if (get_user(n, &up->x) || put_user(n, &vw->x) || | ||
| 349 | get_user(n, &up->y) || put_user(n, &vw->y) || | ||
| 350 | get_user(n, &up->width) || put_user(n, &vw->width) || | ||
| 351 | get_user(n, &up->height) || put_user(n, &vw->height) || | ||
| 352 | get_user(n, &up->chromakey) || put_user(n, &vw->chromakey) || | ||
| 353 | get_user(n, &up->flags) || put_user(n, &vw->flags) || | ||
| 354 | get_user(n, &up->clipcount) || put_user(n, &vw->clipcount) || | ||
| 355 | get_user(n, &up->clips) || put_user(p, &vw->clips)) | ||
| 356 | return -EFAULT; | ||
| 357 | |||
| 358 | if (nclips) { | ||
| 359 | struct video_clip32 __user *u = compat_ptr(n); | ||
| 360 | int i; | ||
| 361 | if (!u) | ||
| 362 | return -EINVAL; | ||
| 363 | for (i = 0; i < nclips; i++, u++, p++) { | ||
| 364 | s32 v; | ||
| 365 | if (get_user(v, &u->x) || | ||
| 366 | put_user(v, &p->x) || | ||
| 367 | get_user(v, &u->y) || | ||
| 368 | put_user(v, &p->y) || | ||
| 369 | get_user(v, &u->width) || | ||
| 370 | put_user(v, &p->width) || | ||
| 371 | get_user(v, &u->height) || | ||
| 372 | put_user(v, &p->height) || | ||
| 373 | put_user(NULL, &p->next)) | ||
| 374 | return -EFAULT; | ||
| 375 | } | ||
| 376 | } | ||
| 377 | |||
| 378 | return sys_ioctl(fd, VIDIOCSWIN, (unsigned long)p); | ||
| 379 | } | ||
| 380 | |||
| 381 | static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
| 382 | { | ||
| 383 | union { | ||
| 384 | struct video_tuner vt; | ||
| 385 | struct video_buffer vb; | ||
| 386 | struct video_window vw; | ||
| 387 | unsigned long vx; | ||
| 388 | } karg; | ||
| 389 | mm_segment_t old_fs = get_fs(); | ||
| 390 | void __user *up = compat_ptr(arg); | ||
| 391 | int err = 0; | ||
| 392 | |||
| 393 | /* First, convert the command. */ | ||
| 394 | switch(cmd) { | ||
| 395 | case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; | ||
| 396 | case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; | ||
| 397 | case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; | ||
| 398 | case VIDIOCGFBUF32: cmd = VIDIOCGFBUF; break; | ||
| 399 | case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; | ||
| 400 | case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; | ||
| 401 | case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break; | ||
| 402 | }; | ||
| 403 | |||
| 404 | switch(cmd) { | ||
| 405 | case VIDIOCSTUNER: | ||
| 406 | case VIDIOCGTUNER: | ||
| 407 | err = get_video_tuner32(&karg.vt, up); | ||
| 408 | break; | ||
| 409 | |||
| 410 | case VIDIOCSFBUF: | ||
| 411 | err = get_video_buffer32(&karg.vb, up); | ||
| 412 | break; | ||
| 413 | |||
| 414 | case VIDIOCSFREQ: | ||
| 415 | err = get_user(karg.vx, (u32 __user *)up); | ||
| 416 | break; | ||
| 417 | }; | ||
| 418 | if(err) | ||
| 419 | goto out; | ||
| 420 | |||
| 421 | set_fs(KERNEL_DS); | ||
| 422 | err = sys_ioctl(fd, cmd, (unsigned long)&karg); | ||
| 423 | set_fs(old_fs); | ||
| 424 | |||
| 425 | if(err == 0) { | ||
| 426 | switch(cmd) { | ||
| 427 | case VIDIOCGTUNER: | ||
| 428 | err = put_video_tuner32(&karg.vt, up); | ||
| 429 | break; | ||
| 430 | |||
| 431 | case VIDIOCGWIN: | ||
| 432 | err = put_video_window32(&karg.vw, up); | ||
| 433 | break; | ||
| 434 | |||
| 435 | case VIDIOCGFBUF: | ||
| 436 | err = put_video_buffer32(&karg.vb, up); | ||
| 437 | break; | ||
| 438 | |||
| 439 | case VIDIOCGFREQ: | ||
| 440 | err = put_user(((u32)karg.vx), (u32 __user *)up); | ||
| 441 | break; | ||
| 442 | }; | ||
| 443 | } | ||
| 444 | out: | ||
| 445 | return err; | ||
| 446 | } | ||
| 447 | |||
| 448 | struct compat_dmx_event { | 207 | struct compat_dmx_event { |
| 449 | dmx_event_t event; | 208 | dmx_event_t event; |
| 450 | compat_time_t timeStamp; | 209 | compat_time_t timeStamp; |
| @@ -1158,6 +917,40 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
| 1158 | return err; | 917 | return err; |
| 1159 | } | 918 | } |
| 1160 | 919 | ||
| 920 | struct compat_sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */ | ||
| 921 | char req_state; | ||
| 922 | char orphan; | ||
| 923 | char sg_io_owned; | ||
| 924 | char problem; | ||
| 925 | int pack_id; | ||
| 926 | compat_uptr_t usr_ptr; | ||
| 927 | unsigned int duration; | ||
| 928 | int unused; | ||
| 929 | }; | ||
| 930 | |||
| 931 | static int sg_grt_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
| 932 | { | ||
| 933 | int err, i; | ||
| 934 | sg_req_info_t *r; | ||
| 935 | struct compat_sg_req_info *o = (struct compat_sg_req_info *)arg; | ||
| 936 | r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE); | ||
| 937 | err = sys_ioctl(fd,cmd,(unsigned long)r); | ||
| 938 | if (err < 0) | ||
| 939 | return err; | ||
| 940 | for (i = 0; i < SG_MAX_QUEUE; i++) { | ||
| 941 | void __user *ptr; | ||
| 942 | int d; | ||
| 943 | |||
| 944 | if (copy_in_user(o + i, r + i, offsetof(sg_req_info_t, usr_ptr)) || | ||
| 945 | get_user(ptr, &r[i].usr_ptr) || | ||
| 946 | get_user(d, &r[i].duration) || | ||
| 947 | put_user((u32)(unsigned long)(ptr), &o[i].usr_ptr) || | ||
| 948 | put_user(d, &o[i].duration)) | ||
| 949 | return -EFAULT; | ||
| 950 | } | ||
| 951 | return err; | ||
| 952 | } | ||
| 953 | |||
| 1161 | struct sock_fprog32 { | 954 | struct sock_fprog32 { |
| 1162 | unsigned short len; | 955 | unsigned short len; |
| 1163 | compat_caddr_t filter; | 956 | compat_caddr_t filter; |
| @@ -2713,6 +2506,49 @@ static int old_bridge_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg | |||
| 2713 | return -EINVAL; | 2506 | return -EINVAL; |
| 2714 | } | 2507 | } |
| 2715 | 2508 | ||
| 2509 | #define RTC_IRQP_READ32 _IOR('p', 0x0b, compat_ulong_t) | ||
| 2510 | #define RTC_IRQP_SET32 _IOW('p', 0x0c, compat_ulong_t) | ||
| 2511 | #define RTC_EPOCH_READ32 _IOR('p', 0x0d, compat_ulong_t) | ||
| 2512 | #define RTC_EPOCH_SET32 _IOW('p', 0x0e, compat_ulong_t) | ||
| 2513 | |||
| 2514 | static int rtc_ioctl(unsigned fd, unsigned cmd, unsigned long arg) | ||
| 2515 | { | ||
| 2516 | mm_segment_t oldfs = get_fs(); | ||
| 2517 | compat_ulong_t val32; | ||
| 2518 | unsigned long kval; | ||
| 2519 | int ret; | ||
| 2520 | |||
| 2521 | switch (cmd) { | ||
| 2522 | case RTC_IRQP_READ32: | ||
| 2523 | case RTC_EPOCH_READ32: | ||
| 2524 | set_fs(KERNEL_DS); | ||
| 2525 | ret = sys_ioctl(fd, (cmd == RTC_IRQP_READ32) ? | ||
| 2526 | RTC_IRQP_READ : RTC_EPOCH_READ, | ||
| 2527 | (unsigned long)&kval); | ||
| 2528 | set_fs(oldfs); | ||
| 2529 | if (ret) | ||
| 2530 | return ret; | ||
| 2531 | val32 = kval; | ||
| 2532 | return put_user(val32, (unsigned int __user *)arg); | ||
| 2533 | case RTC_IRQP_SET32: | ||
| 2534 | case RTC_EPOCH_SET32: | ||
| 2535 | ret = get_user(val32, (unsigned int __user *)arg); | ||
| 2536 | if (ret) | ||
| 2537 | return ret; | ||
| 2538 | kval = val32; | ||
| 2539 | |||
| 2540 | set_fs(KERNEL_DS); | ||
| 2541 | ret = sys_ioctl(fd, (cmd == RTC_IRQP_SET32) ? | ||
| 2542 | RTC_IRQP_SET : RTC_EPOCH_SET, | ||
| 2543 | (unsigned long)&kval); | ||
| 2544 | set_fs(oldfs); | ||
| 2545 | return ret; | ||
| 2546 | default: | ||
| 2547 | /* unreached */ | ||
| 2548 | return -ENOIOCTLCMD; | ||
| 2549 | } | ||
| 2550 | } | ||
| 2551 | |||
| 2716 | #if defined(CONFIG_NCP_FS) || defined(CONFIG_NCP_FS_MODULE) | 2552 | #if defined(CONFIG_NCP_FS) || defined(CONFIG_NCP_FS_MODULE) |
| 2717 | struct ncp_ioctl_request_32 { | 2553 | struct ncp_ioctl_request_32 { |
| 2718 | u32 function; | 2554 | u32 function; |
| @@ -2900,10 +2736,34 @@ static int do_ncp_setprivatedata(unsigned int fd, unsigned int cmd, unsigned lon | |||
| 2900 | } | 2736 | } |
| 2901 | #endif | 2737 | #endif |
| 2902 | 2738 | ||
| 2903 | #undef CODE | 2739 | static int |
| 2904 | #endif | 2740 | lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) |
| 2741 | { | ||
| 2742 | struct compat_timeval *tc = (struct compat_timeval *)arg; | ||
| 2743 | struct timeval *tn = compat_alloc_user_space(sizeof(struct timeval)); | ||
| 2744 | struct timeval ts; | ||
| 2745 | if (get_user(ts.tv_sec, &tc->tv_sec) || | ||
| 2746 | get_user(ts.tv_usec, &tc->tv_usec) || | ||
| 2747 | put_user(ts.tv_sec, &tn->tv_sec) || | ||
| 2748 | put_user(ts.tv_usec, &tn->tv_usec)) | ||
| 2749 | return -EFAULT; | ||
| 2750 | return sys_ioctl(fd, cmd, (unsigned long)tn); | ||
| 2751 | } | ||
| 2752 | |||
| 2753 | #define HANDLE_IOCTL(cmd,handler) \ | ||
| 2754 | { (cmd), (ioctl_trans_handler_t)(handler) }, | ||
| 2755 | |||
| 2756 | /* pointer to compatible structure or no argument */ | ||
| 2757 | #define COMPATIBLE_IOCTL(cmd) \ | ||
| 2758 | { (cmd), do_ioctl32_pointer }, | ||
| 2759 | |||
| 2760 | /* argument is an unsigned long integer, not a pointer */ | ||
| 2761 | #define ULONG_IOCTL(cmd) \ | ||
| 2762 | { (cmd), (ioctl_trans_handler_t)sys_ioctl }, | ||
| 2905 | 2763 | ||
| 2906 | #ifdef DECLARES | 2764 | |
| 2765 | struct ioctl_trans ioctl_start[] = { | ||
| 2766 | #include <linux/compat_ioctl.h> | ||
| 2907 | HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) | 2767 | HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) |
| 2908 | HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) | 2768 | HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) |
| 2909 | #ifdef CONFIG_NET | 2769 | #ifdef CONFIG_NET |
| @@ -2983,6 +2843,7 @@ HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans) | |||
| 2983 | HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans) | 2843 | HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans) |
| 2984 | HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans) | 2844 | HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans) |
| 2985 | HANDLE_IOCTL(SG_IO,sg_ioctl_trans) | 2845 | HANDLE_IOCTL(SG_IO,sg_ioctl_trans) |
| 2846 | HANDLE_IOCTL(SG_GET_REQUEST_TABLE, sg_grt_trans) | ||
| 2986 | HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans) | 2847 | HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans) |
| 2987 | HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans) | 2848 | HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans) |
| 2988 | HANDLE_IOCTL(PPPIOCSPASS32, ppp_sock_fprog_ioctl_trans) | 2849 | HANDLE_IOCTL(PPPIOCSPASS32, ppp_sock_fprog_ioctl_trans) |
| @@ -3015,14 +2876,6 @@ COMPATIBLE_IOCTL(EXT3_IOC_GROUP_ADD) | |||
| 3015 | #ifdef CONFIG_JBD_DEBUG | 2876 | #ifdef CONFIG_JBD_DEBUG |
| 3016 | HANDLE_IOCTL(EXT3_IOC32_WAIT_FOR_READONLY, do_ext3_ioctl) | 2877 | HANDLE_IOCTL(EXT3_IOC32_WAIT_FOR_READONLY, do_ext3_ioctl) |
| 3017 | #endif | 2878 | #endif |
| 3018 | HANDLE_IOCTL(VIDIOCGTUNER32, do_video_ioctl) | ||
| 3019 | HANDLE_IOCTL(VIDIOCSTUNER32, do_video_ioctl) | ||
| 3020 | HANDLE_IOCTL(VIDIOCGWIN32, do_video_ioctl) | ||
| 3021 | HANDLE_IOCTL(VIDIOCSWIN32, do_set_window) | ||
| 3022 | HANDLE_IOCTL(VIDIOCGFBUF32, do_video_ioctl) | ||
| 3023 | HANDLE_IOCTL(VIDIOCSFBUF32, do_video_ioctl) | ||
| 3024 | HANDLE_IOCTL(VIDIOCGFREQ32, do_video_ioctl) | ||
| 3025 | HANDLE_IOCTL(VIDIOCSFREQ32, do_video_ioctl) | ||
| 3026 | /* One SMB ioctl needs translations. */ | 2879 | /* One SMB ioctl needs translations. */ |
| 3027 | #define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t) | 2880 | #define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t) |
| 3028 | HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid) | 2881 | HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid) |
| @@ -3104,6 +2957,10 @@ HANDLE_IOCTL(SIOCSIWENCODE, do_wireless_ioctl) | |||
| 3104 | HANDLE_IOCTL(SIOCGIWENCODE, do_wireless_ioctl) | 2957 | HANDLE_IOCTL(SIOCGIWENCODE, do_wireless_ioctl) |
| 3105 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) | 2958 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) |
| 3106 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) | 2959 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) |
| 2960 | HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl) | ||
| 2961 | HANDLE_IOCTL(RTC_IRQP_SET32, rtc_ioctl) | ||
| 2962 | HANDLE_IOCTL(RTC_EPOCH_READ32, rtc_ioctl) | ||
| 2963 | HANDLE_IOCTL(RTC_EPOCH_SET32, rtc_ioctl) | ||
| 3107 | 2964 | ||
| 3108 | #if defined(CONFIG_NCP_FS) || defined(CONFIG_NCP_FS_MODULE) | 2965 | #if defined(CONFIG_NCP_FS) || defined(CONFIG_NCP_FS_MODULE) |
| 3109 | HANDLE_IOCTL(NCP_IOC_NCPREQUEST_32, do_ncp_ncprequest) | 2966 | HANDLE_IOCTL(NCP_IOC_NCPREQUEST_32, do_ncp_ncprequest) |
| @@ -3121,5 +2978,19 @@ HANDLE_IOCTL(VIDEO_GET_EVENT, do_video_get_event) | |||
| 3121 | HANDLE_IOCTL(VIDEO_STILLPICTURE, do_video_stillpicture) | 2978 | HANDLE_IOCTL(VIDEO_STILLPICTURE, do_video_stillpicture) |
| 3122 | HANDLE_IOCTL(VIDEO_SET_SPU_PALETTE, do_video_set_spu_palette) | 2979 | HANDLE_IOCTL(VIDEO_SET_SPU_PALETTE, do_video_set_spu_palette) |
| 3123 | 2980 | ||
| 3124 | #undef DECLARES | 2981 | /* parport */ |
| 3125 | #endif | 2982 | COMPATIBLE_IOCTL(LPTIME) |
| 2983 | COMPATIBLE_IOCTL(LPCHAR) | ||
| 2984 | COMPATIBLE_IOCTL(LPABORTOPEN) | ||
| 2985 | COMPATIBLE_IOCTL(LPCAREFUL) | ||
| 2986 | COMPATIBLE_IOCTL(LPWAIT) | ||
| 2987 | COMPATIBLE_IOCTL(LPSETIRQ) | ||
| 2988 | COMPATIBLE_IOCTL(LPGETSTATUS) | ||
| 2989 | COMPATIBLE_IOCTL(LPGETSTATUS) | ||
| 2990 | COMPATIBLE_IOCTL(LPRESET) | ||
| 2991 | /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/ | ||
| 2992 | COMPATIBLE_IOCTL(LPGETFLAGS) | ||
| 2993 | HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans) | ||
| 2994 | }; | ||
| 2995 | |||
| 2996 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); | ||
