diff options
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 1025 |
1 files changed, 1016 insertions, 9 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index c68b055fa26e..d92bc3eb7afc 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/smp_lock.h> | ||
21 | #include <linux/ioctl.h> | 20 | #include <linux/ioctl.h> |
22 | #include <linux/if.h> | 21 | #include <linux/if.h> |
23 | #include <linux/if_bridge.h> | 22 | #include <linux/if_bridge.h> |
@@ -58,7 +57,6 @@ | |||
58 | #include <linux/serial.h> | 57 | #include <linux/serial.h> |
59 | #include <linux/if_tun.h> | 58 | #include <linux/if_tun.h> |
60 | #include <linux/ctype.h> | 59 | #include <linux/ctype.h> |
61 | #include <linux/ioctl32.h> | ||
62 | #include <linux/syscalls.h> | 60 | #include <linux/syscalls.h> |
63 | #include <linux/i2c.h> | 61 | #include <linux/i2c.h> |
64 | #include <linux/i2c-dev.h> | 62 | #include <linux/i2c-dev.h> |
@@ -66,7 +64,6 @@ | |||
66 | #include <linux/atalk.h> | 64 | #include <linux/atalk.h> |
67 | #include <linux/blktrace_api.h> | 65 | #include <linux/blktrace_api.h> |
68 | 66 | ||
69 | #include <net/sock.h> /* siocdevprivate_ioctl */ | ||
70 | #include <net/bluetooth/bluetooth.h> | 67 | #include <net/bluetooth/bluetooth.h> |
71 | #include <net/bluetooth/hci.h> | 68 | #include <net/bluetooth/hci.h> |
72 | #include <net/bluetooth/rfcomm.h> | 69 | #include <net/bluetooth/rfcomm.h> |
@@ -475,7 +472,7 @@ static int bond_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
475 | }; | 472 | }; |
476 | } | 473 | } |
477 | 474 | ||
478 | int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | 475 | static int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) |
479 | { | 476 | { |
480 | struct ifreq __user *u_ifreq64; | 477 | struct ifreq __user *u_ifreq64; |
481 | struct ifreq32 __user *u_ifreq32 = compat_ptr(arg); | 478 | struct ifreq32 __user *u_ifreq32 = compat_ptr(arg); |
@@ -687,8 +684,10 @@ static int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
687 | if (!err) { | 684 | if (!err) { |
688 | err = copy_to_user (ugeo, &geo, 4); | 685 | err = copy_to_user (ugeo, &geo, 4); |
689 | err |= __put_user (geo.start, &ugeo->start); | 686 | err |= __put_user (geo.start, &ugeo->start); |
687 | if (err) | ||
688 | err = -EFAULT; | ||
690 | } | 689 | } |
691 | return err ? -EFAULT : 0; | 690 | return err; |
692 | } | 691 | } |
693 | 692 | ||
694 | static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | 693 | static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) |
@@ -2385,6 +2384,16 @@ lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
2385 | return sys_ioctl(fd, cmd, (unsigned long)tn); | 2384 | return sys_ioctl(fd, cmd, (unsigned long)tn); |
2386 | } | 2385 | } |
2387 | 2386 | ||
2387 | |||
2388 | typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, | ||
2389 | unsigned long, struct file *); | ||
2390 | |||
2391 | struct ioctl_trans { | ||
2392 | unsigned long cmd; | ||
2393 | ioctl_trans_handler_t handler; | ||
2394 | struct ioctl_trans *next; | ||
2395 | }; | ||
2396 | |||
2388 | #define HANDLE_IOCTL(cmd,handler) \ | 2397 | #define HANDLE_IOCTL(cmd,handler) \ |
2389 | { (cmd), (ioctl_trans_handler_t)(handler) }, | 2398 | { (cmd), (ioctl_trans_handler_t)(handler) }, |
2390 | 2399 | ||
@@ -2396,9 +2405,844 @@ lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
2396 | #define ULONG_IOCTL(cmd) \ | 2405 | #define ULONG_IOCTL(cmd) \ |
2397 | { (cmd), (ioctl_trans_handler_t)sys_ioctl }, | 2406 | { (cmd), (ioctl_trans_handler_t)sys_ioctl }, |
2398 | 2407 | ||
2399 | 2408 | /* ioctl should not be warned about even if it's not implemented. | |
2400 | struct ioctl_trans ioctl_start[] = { | 2409 | Valid reasons to use this: |
2401 | #include <linux/compat_ioctl.h> | 2410 | - It is implemented with ->compat_ioctl on some device, but programs |
2411 | call it on others too. | ||
2412 | - The ioctl is not implemented in the native kernel, but programs | ||
2413 | call it commonly anyways. | ||
2414 | Most other reasons are not valid. */ | ||
2415 | #define IGNORE_IOCTL(cmd) COMPATIBLE_IOCTL(cmd) | ||
2416 | |||
2417 | static struct ioctl_trans ioctl_start[] = { | ||
2418 | /* compatible ioctls first */ | ||
2419 | COMPATIBLE_IOCTL(0x4B50) /* KDGHWCLK - not in the kernel, but don't complain */ | ||
2420 | COMPATIBLE_IOCTL(0x4B51) /* KDSHWCLK - not in the kernel, but don't complain */ | ||
2421 | |||
2422 | /* Big T */ | ||
2423 | COMPATIBLE_IOCTL(TCGETA) | ||
2424 | COMPATIBLE_IOCTL(TCSETA) | ||
2425 | COMPATIBLE_IOCTL(TCSETAW) | ||
2426 | COMPATIBLE_IOCTL(TCSETAF) | ||
2427 | COMPATIBLE_IOCTL(TCSBRK) | ||
2428 | ULONG_IOCTL(TCSBRKP) | ||
2429 | COMPATIBLE_IOCTL(TCXONC) | ||
2430 | COMPATIBLE_IOCTL(TCFLSH) | ||
2431 | COMPATIBLE_IOCTL(TCGETS) | ||
2432 | COMPATIBLE_IOCTL(TCSETS) | ||
2433 | COMPATIBLE_IOCTL(TCSETSW) | ||
2434 | COMPATIBLE_IOCTL(TCSETSF) | ||
2435 | COMPATIBLE_IOCTL(TIOCLINUX) | ||
2436 | COMPATIBLE_IOCTL(TIOCSBRK) | ||
2437 | COMPATIBLE_IOCTL(TIOCCBRK) | ||
2438 | ULONG_IOCTL(TIOCMIWAIT) | ||
2439 | COMPATIBLE_IOCTL(TIOCGICOUNT) | ||
2440 | /* Little t */ | ||
2441 | COMPATIBLE_IOCTL(TIOCGETD) | ||
2442 | COMPATIBLE_IOCTL(TIOCSETD) | ||
2443 | COMPATIBLE_IOCTL(TIOCEXCL) | ||
2444 | COMPATIBLE_IOCTL(TIOCNXCL) | ||
2445 | COMPATIBLE_IOCTL(TIOCCONS) | ||
2446 | COMPATIBLE_IOCTL(TIOCGSOFTCAR) | ||
2447 | COMPATIBLE_IOCTL(TIOCSSOFTCAR) | ||
2448 | COMPATIBLE_IOCTL(TIOCSWINSZ) | ||
2449 | COMPATIBLE_IOCTL(TIOCGWINSZ) | ||
2450 | COMPATIBLE_IOCTL(TIOCMGET) | ||
2451 | COMPATIBLE_IOCTL(TIOCMBIC) | ||
2452 | COMPATIBLE_IOCTL(TIOCMBIS) | ||
2453 | COMPATIBLE_IOCTL(TIOCMSET) | ||
2454 | COMPATIBLE_IOCTL(TIOCPKT) | ||
2455 | COMPATIBLE_IOCTL(TIOCNOTTY) | ||
2456 | COMPATIBLE_IOCTL(TIOCSTI) | ||
2457 | COMPATIBLE_IOCTL(TIOCOUTQ) | ||
2458 | COMPATIBLE_IOCTL(TIOCSPGRP) | ||
2459 | COMPATIBLE_IOCTL(TIOCGPGRP) | ||
2460 | ULONG_IOCTL(TIOCSCTTY) | ||
2461 | COMPATIBLE_IOCTL(TIOCGPTN) | ||
2462 | COMPATIBLE_IOCTL(TIOCSPTLCK) | ||
2463 | COMPATIBLE_IOCTL(TIOCSERGETLSR) | ||
2464 | /* Little f */ | ||
2465 | COMPATIBLE_IOCTL(FIOCLEX) | ||
2466 | COMPATIBLE_IOCTL(FIONCLEX) | ||
2467 | COMPATIBLE_IOCTL(FIOASYNC) | ||
2468 | COMPATIBLE_IOCTL(FIONBIO) | ||
2469 | COMPATIBLE_IOCTL(FIONREAD) /* This is also TIOCINQ */ | ||
2470 | /* 0x00 */ | ||
2471 | COMPATIBLE_IOCTL(FIBMAP) | ||
2472 | COMPATIBLE_IOCTL(FIGETBSZ) | ||
2473 | /* 0x03 -- HD/IDE ioctl's used by hdparm and friends. | ||
2474 | * Some need translations, these do not. | ||
2475 | */ | ||
2476 | COMPATIBLE_IOCTL(HDIO_GET_IDENTITY) | ||
2477 | COMPATIBLE_IOCTL(HDIO_DRIVE_TASK) | ||
2478 | COMPATIBLE_IOCTL(HDIO_DRIVE_CMD) | ||
2479 | ULONG_IOCTL(HDIO_SET_MULTCOUNT) | ||
2480 | ULONG_IOCTL(HDIO_SET_UNMASKINTR) | ||
2481 | ULONG_IOCTL(HDIO_SET_KEEPSETTINGS) | ||
2482 | ULONG_IOCTL(HDIO_SET_32BIT) | ||
2483 | ULONG_IOCTL(HDIO_SET_NOWERR) | ||
2484 | ULONG_IOCTL(HDIO_SET_DMA) | ||
2485 | ULONG_IOCTL(HDIO_SET_PIO_MODE) | ||
2486 | ULONG_IOCTL(HDIO_SET_NICE) | ||
2487 | ULONG_IOCTL(HDIO_SET_WCACHE) | ||
2488 | ULONG_IOCTL(HDIO_SET_ACOUSTIC) | ||
2489 | ULONG_IOCTL(HDIO_SET_BUSSTATE) | ||
2490 | ULONG_IOCTL(HDIO_SET_ADDRESS) | ||
2491 | COMPATIBLE_IOCTL(HDIO_SCAN_HWIF) | ||
2492 | /* 0x330 is reserved -- it used to be HDIO_GETGEO_BIG */ | ||
2493 | COMPATIBLE_IOCTL(0x330) | ||
2494 | /* 0x02 -- Floppy ioctls */ | ||
2495 | COMPATIBLE_IOCTL(FDMSGON) | ||
2496 | COMPATIBLE_IOCTL(FDMSGOFF) | ||
2497 | COMPATIBLE_IOCTL(FDSETEMSGTRESH) | ||
2498 | COMPATIBLE_IOCTL(FDFLUSH) | ||
2499 | COMPATIBLE_IOCTL(FDWERRORCLR) | ||
2500 | COMPATIBLE_IOCTL(FDSETMAXERRS) | ||
2501 | COMPATIBLE_IOCTL(FDGETMAXERRS) | ||
2502 | COMPATIBLE_IOCTL(FDGETDRVTYP) | ||
2503 | COMPATIBLE_IOCTL(FDEJECT) | ||
2504 | COMPATIBLE_IOCTL(FDCLRPRM) | ||
2505 | COMPATIBLE_IOCTL(FDFMTBEG) | ||
2506 | COMPATIBLE_IOCTL(FDFMTEND) | ||
2507 | COMPATIBLE_IOCTL(FDRESET) | ||
2508 | COMPATIBLE_IOCTL(FDTWADDLE) | ||
2509 | COMPATIBLE_IOCTL(FDFMTTRK) | ||
2510 | COMPATIBLE_IOCTL(FDRAWCMD) | ||
2511 | /* 0x12 */ | ||
2512 | #ifdef CONFIG_BLOCK | ||
2513 | COMPATIBLE_IOCTL(BLKRASET) | ||
2514 | COMPATIBLE_IOCTL(BLKROSET) | ||
2515 | COMPATIBLE_IOCTL(BLKROGET) | ||
2516 | COMPATIBLE_IOCTL(BLKRRPART) | ||
2517 | COMPATIBLE_IOCTL(BLKFLSBUF) | ||
2518 | COMPATIBLE_IOCTL(BLKSECTSET) | ||
2519 | COMPATIBLE_IOCTL(BLKSSZGET) | ||
2520 | COMPATIBLE_IOCTL(BLKTRACESTART) | ||
2521 | COMPATIBLE_IOCTL(BLKTRACESTOP) | ||
2522 | COMPATIBLE_IOCTL(BLKTRACESETUP) | ||
2523 | COMPATIBLE_IOCTL(BLKTRACETEARDOWN) | ||
2524 | ULONG_IOCTL(BLKRASET) | ||
2525 | ULONG_IOCTL(BLKFRASET) | ||
2526 | #endif | ||
2527 | /* RAID */ | ||
2528 | COMPATIBLE_IOCTL(RAID_VERSION) | ||
2529 | COMPATIBLE_IOCTL(GET_ARRAY_INFO) | ||
2530 | COMPATIBLE_IOCTL(GET_DISK_INFO) | ||
2531 | COMPATIBLE_IOCTL(PRINT_RAID_DEBUG) | ||
2532 | COMPATIBLE_IOCTL(RAID_AUTORUN) | ||
2533 | COMPATIBLE_IOCTL(CLEAR_ARRAY) | ||
2534 | COMPATIBLE_IOCTL(ADD_NEW_DISK) | ||
2535 | ULONG_IOCTL(HOT_REMOVE_DISK) | ||
2536 | COMPATIBLE_IOCTL(SET_ARRAY_INFO) | ||
2537 | COMPATIBLE_IOCTL(SET_DISK_INFO) | ||
2538 | COMPATIBLE_IOCTL(WRITE_RAID_INFO) | ||
2539 | COMPATIBLE_IOCTL(UNPROTECT_ARRAY) | ||
2540 | COMPATIBLE_IOCTL(PROTECT_ARRAY) | ||
2541 | ULONG_IOCTL(HOT_ADD_DISK) | ||
2542 | ULONG_IOCTL(SET_DISK_FAULTY) | ||
2543 | COMPATIBLE_IOCTL(RUN_ARRAY) | ||
2544 | COMPATIBLE_IOCTL(STOP_ARRAY) | ||
2545 | COMPATIBLE_IOCTL(STOP_ARRAY_RO) | ||
2546 | COMPATIBLE_IOCTL(RESTART_ARRAY_RW) | ||
2547 | COMPATIBLE_IOCTL(GET_BITMAP_FILE) | ||
2548 | ULONG_IOCTL(SET_BITMAP_FILE) | ||
2549 | /* DM */ | ||
2550 | COMPATIBLE_IOCTL(DM_VERSION_32) | ||
2551 | COMPATIBLE_IOCTL(DM_REMOVE_ALL_32) | ||
2552 | COMPATIBLE_IOCTL(DM_LIST_DEVICES_32) | ||
2553 | COMPATIBLE_IOCTL(DM_DEV_CREATE_32) | ||
2554 | COMPATIBLE_IOCTL(DM_DEV_REMOVE_32) | ||
2555 | COMPATIBLE_IOCTL(DM_DEV_RENAME_32) | ||
2556 | COMPATIBLE_IOCTL(DM_DEV_SUSPEND_32) | ||
2557 | COMPATIBLE_IOCTL(DM_DEV_STATUS_32) | ||
2558 | COMPATIBLE_IOCTL(DM_DEV_WAIT_32) | ||
2559 | COMPATIBLE_IOCTL(DM_TABLE_LOAD_32) | ||
2560 | COMPATIBLE_IOCTL(DM_TABLE_CLEAR_32) | ||
2561 | COMPATIBLE_IOCTL(DM_TABLE_DEPS_32) | ||
2562 | COMPATIBLE_IOCTL(DM_TABLE_STATUS_32) | ||
2563 | COMPATIBLE_IOCTL(DM_LIST_VERSIONS_32) | ||
2564 | COMPATIBLE_IOCTL(DM_TARGET_MSG_32) | ||
2565 | COMPATIBLE_IOCTL(DM_DEV_SET_GEOMETRY_32) | ||
2566 | COMPATIBLE_IOCTL(DM_VERSION) | ||
2567 | COMPATIBLE_IOCTL(DM_REMOVE_ALL) | ||
2568 | COMPATIBLE_IOCTL(DM_LIST_DEVICES) | ||
2569 | COMPATIBLE_IOCTL(DM_DEV_CREATE) | ||
2570 | COMPATIBLE_IOCTL(DM_DEV_REMOVE) | ||
2571 | COMPATIBLE_IOCTL(DM_DEV_RENAME) | ||
2572 | COMPATIBLE_IOCTL(DM_DEV_SUSPEND) | ||
2573 | COMPATIBLE_IOCTL(DM_DEV_STATUS) | ||
2574 | COMPATIBLE_IOCTL(DM_DEV_WAIT) | ||
2575 | COMPATIBLE_IOCTL(DM_TABLE_LOAD) | ||
2576 | COMPATIBLE_IOCTL(DM_TABLE_CLEAR) | ||
2577 | COMPATIBLE_IOCTL(DM_TABLE_DEPS) | ||
2578 | COMPATIBLE_IOCTL(DM_TABLE_STATUS) | ||
2579 | COMPATIBLE_IOCTL(DM_LIST_VERSIONS) | ||
2580 | COMPATIBLE_IOCTL(DM_TARGET_MSG) | ||
2581 | COMPATIBLE_IOCTL(DM_DEV_SET_GEOMETRY) | ||
2582 | /* Big K */ | ||
2583 | COMPATIBLE_IOCTL(PIO_FONT) | ||
2584 | COMPATIBLE_IOCTL(GIO_FONT) | ||
2585 | ULONG_IOCTL(KDSIGACCEPT) | ||
2586 | COMPATIBLE_IOCTL(KDGETKEYCODE) | ||
2587 | COMPATIBLE_IOCTL(KDSETKEYCODE) | ||
2588 | ULONG_IOCTL(KIOCSOUND) | ||
2589 | ULONG_IOCTL(KDMKTONE) | ||
2590 | COMPATIBLE_IOCTL(KDGKBTYPE) | ||
2591 | ULONG_IOCTL(KDSETMODE) | ||
2592 | COMPATIBLE_IOCTL(KDGETMODE) | ||
2593 | ULONG_IOCTL(KDSKBMODE) | ||
2594 | COMPATIBLE_IOCTL(KDGKBMODE) | ||
2595 | ULONG_IOCTL(KDSKBMETA) | ||
2596 | COMPATIBLE_IOCTL(KDGKBMETA) | ||
2597 | COMPATIBLE_IOCTL(KDGKBENT) | ||
2598 | COMPATIBLE_IOCTL(KDSKBENT) | ||
2599 | COMPATIBLE_IOCTL(KDGKBSENT) | ||
2600 | COMPATIBLE_IOCTL(KDSKBSENT) | ||
2601 | COMPATIBLE_IOCTL(KDGKBDIACR) | ||
2602 | COMPATIBLE_IOCTL(KDSKBDIACR) | ||
2603 | COMPATIBLE_IOCTL(KDKBDREP) | ||
2604 | COMPATIBLE_IOCTL(KDGKBLED) | ||
2605 | ULONG_IOCTL(KDSKBLED) | ||
2606 | COMPATIBLE_IOCTL(KDGETLED) | ||
2607 | ULONG_IOCTL(KDSETLED) | ||
2608 | COMPATIBLE_IOCTL(GIO_SCRNMAP) | ||
2609 | COMPATIBLE_IOCTL(PIO_SCRNMAP) | ||
2610 | COMPATIBLE_IOCTL(GIO_UNISCRNMAP) | ||
2611 | COMPATIBLE_IOCTL(PIO_UNISCRNMAP) | ||
2612 | COMPATIBLE_IOCTL(PIO_FONTRESET) | ||
2613 | COMPATIBLE_IOCTL(PIO_UNIMAPCLR) | ||
2614 | /* Big S */ | ||
2615 | COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN) | ||
2616 | COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK) | ||
2617 | COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK) | ||
2618 | COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY) | ||
2619 | COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER) | ||
2620 | COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND) | ||
2621 | COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST) | ||
2622 | COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI) | ||
2623 | /* Big T */ | ||
2624 | COMPATIBLE_IOCTL(TUNSETNOCSUM) | ||
2625 | COMPATIBLE_IOCTL(TUNSETDEBUG) | ||
2626 | COMPATIBLE_IOCTL(TUNSETPERSIST) | ||
2627 | COMPATIBLE_IOCTL(TUNSETOWNER) | ||
2628 | /* Big V */ | ||
2629 | COMPATIBLE_IOCTL(VT_SETMODE) | ||
2630 | COMPATIBLE_IOCTL(VT_GETMODE) | ||
2631 | COMPATIBLE_IOCTL(VT_GETSTATE) | ||
2632 | COMPATIBLE_IOCTL(VT_OPENQRY) | ||
2633 | ULONG_IOCTL(VT_ACTIVATE) | ||
2634 | ULONG_IOCTL(VT_WAITACTIVE) | ||
2635 | ULONG_IOCTL(VT_RELDISP) | ||
2636 | ULONG_IOCTL(VT_DISALLOCATE) | ||
2637 | COMPATIBLE_IOCTL(VT_RESIZE) | ||
2638 | COMPATIBLE_IOCTL(VT_RESIZEX) | ||
2639 | COMPATIBLE_IOCTL(VT_LOCKSWITCH) | ||
2640 | COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) | ||
2641 | COMPATIBLE_IOCTL(VT_GETHIFONTMASK) | ||
2642 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ | ||
2643 | COMPATIBLE_IOCTL(RTC_AIE_ON) | ||
2644 | COMPATIBLE_IOCTL(RTC_AIE_OFF) | ||
2645 | COMPATIBLE_IOCTL(RTC_UIE_ON) | ||
2646 | COMPATIBLE_IOCTL(RTC_UIE_OFF) | ||
2647 | COMPATIBLE_IOCTL(RTC_PIE_ON) | ||
2648 | COMPATIBLE_IOCTL(RTC_PIE_OFF) | ||
2649 | COMPATIBLE_IOCTL(RTC_WIE_ON) | ||
2650 | COMPATIBLE_IOCTL(RTC_WIE_OFF) | ||
2651 | COMPATIBLE_IOCTL(RTC_ALM_SET) | ||
2652 | COMPATIBLE_IOCTL(RTC_ALM_READ) | ||
2653 | COMPATIBLE_IOCTL(RTC_RD_TIME) | ||
2654 | COMPATIBLE_IOCTL(RTC_SET_TIME) | ||
2655 | COMPATIBLE_IOCTL(RTC_WKALM_SET) | ||
2656 | COMPATIBLE_IOCTL(RTC_WKALM_RD) | ||
2657 | /* | ||
2658 | * These two are only for the sbus rtc driver, but | ||
2659 | * hwclock tries them on every rtc device first when | ||
2660 | * running on sparc. On other architectures the entries | ||
2661 | * are useless but harmless. | ||
2662 | */ | ||
2663 | COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */ | ||
2664 | COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */ | ||
2665 | /* Little m */ | ||
2666 | COMPATIBLE_IOCTL(MTIOCTOP) | ||
2667 | /* Socket level stuff */ | ||
2668 | COMPATIBLE_IOCTL(FIOQSIZE) | ||
2669 | COMPATIBLE_IOCTL(FIOSETOWN) | ||
2670 | COMPATIBLE_IOCTL(SIOCSPGRP) | ||
2671 | COMPATIBLE_IOCTL(FIOGETOWN) | ||
2672 | COMPATIBLE_IOCTL(SIOCGPGRP) | ||
2673 | COMPATIBLE_IOCTL(SIOCATMARK) | ||
2674 | COMPATIBLE_IOCTL(SIOCSIFLINK) | ||
2675 | COMPATIBLE_IOCTL(SIOCSIFENCAP) | ||
2676 | COMPATIBLE_IOCTL(SIOCGIFENCAP) | ||
2677 | COMPATIBLE_IOCTL(SIOCSIFNAME) | ||
2678 | COMPATIBLE_IOCTL(SIOCSARP) | ||
2679 | COMPATIBLE_IOCTL(SIOCGARP) | ||
2680 | COMPATIBLE_IOCTL(SIOCDARP) | ||
2681 | COMPATIBLE_IOCTL(SIOCSRARP) | ||
2682 | COMPATIBLE_IOCTL(SIOCGRARP) | ||
2683 | COMPATIBLE_IOCTL(SIOCDRARP) | ||
2684 | COMPATIBLE_IOCTL(SIOCADDDLCI) | ||
2685 | COMPATIBLE_IOCTL(SIOCDELDLCI) | ||
2686 | COMPATIBLE_IOCTL(SIOCGMIIPHY) | ||
2687 | COMPATIBLE_IOCTL(SIOCGMIIREG) | ||
2688 | COMPATIBLE_IOCTL(SIOCSMIIREG) | ||
2689 | COMPATIBLE_IOCTL(SIOCGIFVLAN) | ||
2690 | COMPATIBLE_IOCTL(SIOCSIFVLAN) | ||
2691 | COMPATIBLE_IOCTL(SIOCBRADDBR) | ||
2692 | COMPATIBLE_IOCTL(SIOCBRDELBR) | ||
2693 | /* SG stuff */ | ||
2694 | COMPATIBLE_IOCTL(SG_SET_TIMEOUT) | ||
2695 | COMPATIBLE_IOCTL(SG_GET_TIMEOUT) | ||
2696 | COMPATIBLE_IOCTL(SG_EMULATED_HOST) | ||
2697 | ULONG_IOCTL(SG_SET_TRANSFORM) | ||
2698 | COMPATIBLE_IOCTL(SG_GET_TRANSFORM) | ||
2699 | COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE) | ||
2700 | COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE) | ||
2701 | COMPATIBLE_IOCTL(SG_GET_SCSI_ID) | ||
2702 | COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA) | ||
2703 | COMPATIBLE_IOCTL(SG_GET_LOW_DMA) | ||
2704 | COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID) | ||
2705 | COMPATIBLE_IOCTL(SG_GET_PACK_ID) | ||
2706 | COMPATIBLE_IOCTL(SG_GET_NUM_WAITING) | ||
2707 | COMPATIBLE_IOCTL(SG_SET_DEBUG) | ||
2708 | COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE) | ||
2709 | COMPATIBLE_IOCTL(SG_GET_COMMAND_Q) | ||
2710 | COMPATIBLE_IOCTL(SG_SET_COMMAND_Q) | ||
2711 | COMPATIBLE_IOCTL(SG_GET_VERSION_NUM) | ||
2712 | COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN) | ||
2713 | COMPATIBLE_IOCTL(SG_SCSI_RESET) | ||
2714 | COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE) | ||
2715 | COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN) | ||
2716 | COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN) | ||
2717 | /* PPP stuff */ | ||
2718 | COMPATIBLE_IOCTL(PPPIOCGFLAGS) | ||
2719 | COMPATIBLE_IOCTL(PPPIOCSFLAGS) | ||
2720 | COMPATIBLE_IOCTL(PPPIOCGASYNCMAP) | ||
2721 | COMPATIBLE_IOCTL(PPPIOCSASYNCMAP) | ||
2722 | COMPATIBLE_IOCTL(PPPIOCGUNIT) | ||
2723 | COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP) | ||
2724 | COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP) | ||
2725 | COMPATIBLE_IOCTL(PPPIOCGMRU) | ||
2726 | COMPATIBLE_IOCTL(PPPIOCSMRU) | ||
2727 | COMPATIBLE_IOCTL(PPPIOCSMAXCID) | ||
2728 | COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP) | ||
2729 | COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP) | ||
2730 | COMPATIBLE_IOCTL(PPPIOCXFERUNIT) | ||
2731 | /* PPPIOCSCOMPRESS is translated */ | ||
2732 | COMPATIBLE_IOCTL(PPPIOCGNPMODE) | ||
2733 | COMPATIBLE_IOCTL(PPPIOCSNPMODE) | ||
2734 | COMPATIBLE_IOCTL(PPPIOCGDEBUG) | ||
2735 | COMPATIBLE_IOCTL(PPPIOCSDEBUG) | ||
2736 | /* PPPIOCSPASS is translated */ | ||
2737 | /* PPPIOCSACTIVE is translated */ | ||
2738 | /* PPPIOCGIDLE is translated */ | ||
2739 | COMPATIBLE_IOCTL(PPPIOCNEWUNIT) | ||
2740 | COMPATIBLE_IOCTL(PPPIOCATTACH) | ||
2741 | COMPATIBLE_IOCTL(PPPIOCDETACH) | ||
2742 | COMPATIBLE_IOCTL(PPPIOCSMRRU) | ||
2743 | COMPATIBLE_IOCTL(PPPIOCCONNECT) | ||
2744 | COMPATIBLE_IOCTL(PPPIOCDISCONN) | ||
2745 | COMPATIBLE_IOCTL(PPPIOCATTCHAN) | ||
2746 | COMPATIBLE_IOCTL(PPPIOCGCHAN) | ||
2747 | /* PPPOX */ | ||
2748 | COMPATIBLE_IOCTL(PPPOEIOCSFWD) | ||
2749 | COMPATIBLE_IOCTL(PPPOEIOCDFWD) | ||
2750 | /* LP */ | ||
2751 | COMPATIBLE_IOCTL(LPGETSTATUS) | ||
2752 | /* ppdev */ | ||
2753 | COMPATIBLE_IOCTL(PPSETMODE) | ||
2754 | COMPATIBLE_IOCTL(PPRSTATUS) | ||
2755 | COMPATIBLE_IOCTL(PPRCONTROL) | ||
2756 | COMPATIBLE_IOCTL(PPWCONTROL) | ||
2757 | COMPATIBLE_IOCTL(PPFCONTROL) | ||
2758 | COMPATIBLE_IOCTL(PPRDATA) | ||
2759 | COMPATIBLE_IOCTL(PPWDATA) | ||
2760 | COMPATIBLE_IOCTL(PPCLAIM) | ||
2761 | COMPATIBLE_IOCTL(PPRELEASE) | ||
2762 | COMPATIBLE_IOCTL(PPYIELD) | ||
2763 | COMPATIBLE_IOCTL(PPEXCL) | ||
2764 | COMPATIBLE_IOCTL(PPDATADIR) | ||
2765 | COMPATIBLE_IOCTL(PPNEGOT) | ||
2766 | COMPATIBLE_IOCTL(PPWCTLONIRQ) | ||
2767 | COMPATIBLE_IOCTL(PPCLRIRQ) | ||
2768 | COMPATIBLE_IOCTL(PPSETPHASE) | ||
2769 | COMPATIBLE_IOCTL(PPGETMODES) | ||
2770 | COMPATIBLE_IOCTL(PPGETMODE) | ||
2771 | COMPATIBLE_IOCTL(PPGETPHASE) | ||
2772 | COMPATIBLE_IOCTL(PPGETFLAGS) | ||
2773 | COMPATIBLE_IOCTL(PPSETFLAGS) | ||
2774 | /* CDROM stuff */ | ||
2775 | COMPATIBLE_IOCTL(CDROMPAUSE) | ||
2776 | COMPATIBLE_IOCTL(CDROMRESUME) | ||
2777 | COMPATIBLE_IOCTL(CDROMPLAYMSF) | ||
2778 | COMPATIBLE_IOCTL(CDROMPLAYTRKIND) | ||
2779 | COMPATIBLE_IOCTL(CDROMREADTOCHDR) | ||
2780 | COMPATIBLE_IOCTL(CDROMREADTOCENTRY) | ||
2781 | COMPATIBLE_IOCTL(CDROMSTOP) | ||
2782 | COMPATIBLE_IOCTL(CDROMSTART) | ||
2783 | COMPATIBLE_IOCTL(CDROMEJECT) | ||
2784 | COMPATIBLE_IOCTL(CDROMVOLCTRL) | ||
2785 | COMPATIBLE_IOCTL(CDROMSUBCHNL) | ||
2786 | ULONG_IOCTL(CDROMEJECT_SW) | ||
2787 | COMPATIBLE_IOCTL(CDROMMULTISESSION) | ||
2788 | COMPATIBLE_IOCTL(CDROM_GET_MCN) | ||
2789 | COMPATIBLE_IOCTL(CDROMRESET) | ||
2790 | COMPATIBLE_IOCTL(CDROMVOLREAD) | ||
2791 | COMPATIBLE_IOCTL(CDROMSEEK) | ||
2792 | COMPATIBLE_IOCTL(CDROMPLAYBLK) | ||
2793 | COMPATIBLE_IOCTL(CDROMCLOSETRAY) | ||
2794 | ULONG_IOCTL(CDROM_SET_OPTIONS) | ||
2795 | ULONG_IOCTL(CDROM_CLEAR_OPTIONS) | ||
2796 | ULONG_IOCTL(CDROM_SELECT_SPEED) | ||
2797 | ULONG_IOCTL(CDROM_SELECT_DISC) | ||
2798 | ULONG_IOCTL(CDROM_MEDIA_CHANGED) | ||
2799 | ULONG_IOCTL(CDROM_DRIVE_STATUS) | ||
2800 | COMPATIBLE_IOCTL(CDROM_DISC_STATUS) | ||
2801 | COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS) | ||
2802 | ULONG_IOCTL(CDROM_LOCKDOOR) | ||
2803 | ULONG_IOCTL(CDROM_DEBUG) | ||
2804 | COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY) | ||
2805 | /* Ignore cdrom.h about these next 5 ioctls, they absolutely do | ||
2806 | * not take a struct cdrom_read, instead they take a struct cdrom_msf | ||
2807 | * which is compatible. | ||
2808 | */ | ||
2809 | COMPATIBLE_IOCTL(CDROMREADMODE2) | ||
2810 | COMPATIBLE_IOCTL(CDROMREADMODE1) | ||
2811 | COMPATIBLE_IOCTL(CDROMREADRAW) | ||
2812 | COMPATIBLE_IOCTL(CDROMREADCOOKED) | ||
2813 | COMPATIBLE_IOCTL(CDROMREADALL) | ||
2814 | /* DVD ioctls */ | ||
2815 | COMPATIBLE_IOCTL(DVD_READ_STRUCT) | ||
2816 | COMPATIBLE_IOCTL(DVD_WRITE_STRUCT) | ||
2817 | COMPATIBLE_IOCTL(DVD_AUTH) | ||
2818 | /* pktcdvd */ | ||
2819 | COMPATIBLE_IOCTL(PACKET_CTRL_CMD) | ||
2820 | /* Big A */ | ||
2821 | /* sparc only */ | ||
2822 | /* Big Q for sound/OSS */ | ||
2823 | COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET) | ||
2824 | COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC) | ||
2825 | COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO) | ||
2826 | COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE) | ||
2827 | COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT) | ||
2828 | COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT) | ||
2829 | COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE) | ||
2830 | COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR) | ||
2831 | COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI) | ||
2832 | COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES) | ||
2833 | COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS) | ||
2834 | COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS) | ||
2835 | COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO) | ||
2836 | COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD) | ||
2837 | COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL) | ||
2838 | COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE) | ||
2839 | COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC) | ||
2840 | COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND) | ||
2841 | COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME) | ||
2842 | COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID) | ||
2843 | COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL) | ||
2844 | COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE) | ||
2845 | /* Big T for sound/OSS */ | ||
2846 | COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE) | ||
2847 | COMPATIBLE_IOCTL(SNDCTL_TMR_START) | ||
2848 | COMPATIBLE_IOCTL(SNDCTL_TMR_STOP) | ||
2849 | COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE) | ||
2850 | COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO) | ||
2851 | COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE) | ||
2852 | COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME) | ||
2853 | COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT) | ||
2854 | /* Little m for sound/OSS */ | ||
2855 | COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME) | ||
2856 | COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE) | ||
2857 | COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD) | ||
2858 | /* Big P for sound/OSS */ | ||
2859 | COMPATIBLE_IOCTL(SNDCTL_DSP_RESET) | ||
2860 | COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC) | ||
2861 | COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED) | ||
2862 | COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO) | ||
2863 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE) | ||
2864 | COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS) | ||
2865 | COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER) | ||
2866 | COMPATIBLE_IOCTL(SNDCTL_DSP_POST) | ||
2867 | COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE) | ||
2868 | COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT) | ||
2869 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS) | ||
2870 | COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT) | ||
2871 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE) | ||
2872 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE) | ||
2873 | COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK) | ||
2874 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS) | ||
2875 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER) | ||
2876 | COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER) | ||
2877 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR) | ||
2878 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR) | ||
2879 | /* SNDCTL_DSP_MAPINBUF, XXX needs translation */ | ||
2880 | /* SNDCTL_DSP_MAPOUTBUF, XXX needs translation */ | ||
2881 | COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO) | ||
2882 | COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX) | ||
2883 | COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY) | ||
2884 | COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE) | ||
2885 | COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE) | ||
2886 | COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS) | ||
2887 | COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS) | ||
2888 | COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER) | ||
2889 | /* Big C for sound/OSS */ | ||
2890 | COMPATIBLE_IOCTL(SNDCTL_COPR_RESET) | ||
2891 | COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD) | ||
2892 | COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA) | ||
2893 | COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE) | ||
2894 | COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA) | ||
2895 | COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE) | ||
2896 | COMPATIBLE_IOCTL(SNDCTL_COPR_RUN) | ||
2897 | COMPATIBLE_IOCTL(SNDCTL_COPR_HALT) | ||
2898 | COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG) | ||
2899 | COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG) | ||
2900 | /* Big M for sound/OSS */ | ||
2901 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME) | ||
2902 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS) | ||
2903 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE) | ||
2904 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH) | ||
2905 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM) | ||
2906 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER) | ||
2907 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE) | ||
2908 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC) | ||
2909 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD) | ||
2910 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX) | ||
2911 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM) | ||
2912 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV) | ||
2913 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN) | ||
2914 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN) | ||
2915 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1) | ||
2916 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2) | ||
2917 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3) | ||
2918 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1)) | ||
2919 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2)) | ||
2920 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3)) | ||
2921 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN)) | ||
2922 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT)) | ||
2923 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO)) | ||
2924 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO)) | ||
2925 | COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR)) | ||
2926 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_MUTE) | ||
2927 | /* SOUND_MIXER_READ_ENHANCE, same value as READ_MUTE */ | ||
2928 | /* SOUND_MIXER_READ_LOUD, same value as READ_MUTE */ | ||
2929 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC) | ||
2930 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK) | ||
2931 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK) | ||
2932 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS) | ||
2933 | COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS) | ||
2934 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME) | ||
2935 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS) | ||
2936 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE) | ||
2937 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH) | ||
2938 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM) | ||
2939 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER) | ||
2940 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE) | ||
2941 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC) | ||
2942 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD) | ||
2943 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX) | ||
2944 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM) | ||
2945 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV) | ||
2946 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN) | ||
2947 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN) | ||
2948 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1) | ||
2949 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2) | ||
2950 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3) | ||
2951 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1)) | ||
2952 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2)) | ||
2953 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3)) | ||
2954 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN)) | ||
2955 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT)) | ||
2956 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO)) | ||
2957 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO)) | ||
2958 | COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR)) | ||
2959 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE) | ||
2960 | /* SOUND_MIXER_WRITE_ENHANCE, same value as WRITE_MUTE */ | ||
2961 | /* SOUND_MIXER_WRITE_LOUD, same value as WRITE_MUTE */ | ||
2962 | COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC) | ||
2963 | COMPATIBLE_IOCTL(SOUND_MIXER_INFO) | ||
2964 | COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO) | ||
2965 | COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS) | ||
2966 | COMPATIBLE_IOCTL(SOUND_MIXER_AGC) | ||
2967 | COMPATIBLE_IOCTL(SOUND_MIXER_3DSE) | ||
2968 | COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1) | ||
2969 | COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2) | ||
2970 | COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3) | ||
2971 | COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4) | ||
2972 | COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5) | ||
2973 | COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS) | ||
2974 | COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS) | ||
2975 | COMPATIBLE_IOCTL(OSS_GETVERSION) | ||
2976 | /* AUTOFS */ | ||
2977 | ULONG_IOCTL(AUTOFS_IOC_READY) | ||
2978 | ULONG_IOCTL(AUTOFS_IOC_FAIL) | ||
2979 | COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC) | ||
2980 | COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER) | ||
2981 | COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE) | ||
2982 | COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI) | ||
2983 | COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER) | ||
2984 | COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST) | ||
2985 | COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST) | ||
2986 | COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) | ||
2987 | /* Raw devices */ | ||
2988 | COMPATIBLE_IOCTL(RAW_SETBIND) | ||
2989 | COMPATIBLE_IOCTL(RAW_GETBIND) | ||
2990 | /* SMB ioctls which do not need any translations */ | ||
2991 | COMPATIBLE_IOCTL(SMB_IOC_NEWCONN) | ||
2992 | /* Little a */ | ||
2993 | COMPATIBLE_IOCTL(ATMSIGD_CTRL) | ||
2994 | COMPATIBLE_IOCTL(ATMARPD_CTRL) | ||
2995 | COMPATIBLE_IOCTL(ATMLEC_CTRL) | ||
2996 | COMPATIBLE_IOCTL(ATMLEC_MCAST) | ||
2997 | COMPATIBLE_IOCTL(ATMLEC_DATA) | ||
2998 | COMPATIBLE_IOCTL(ATM_SETSC) | ||
2999 | COMPATIBLE_IOCTL(SIOCSIFATMTCP) | ||
3000 | COMPATIBLE_IOCTL(SIOCMKCLIP) | ||
3001 | COMPATIBLE_IOCTL(ATMARP_MKIP) | ||
3002 | COMPATIBLE_IOCTL(ATMARP_SETENTRY) | ||
3003 | COMPATIBLE_IOCTL(ATMARP_ENCAP) | ||
3004 | COMPATIBLE_IOCTL(ATMTCP_CREATE) | ||
3005 | COMPATIBLE_IOCTL(ATMTCP_REMOVE) | ||
3006 | COMPATIBLE_IOCTL(ATMMPC_CTRL) | ||
3007 | COMPATIBLE_IOCTL(ATMMPC_DATA) | ||
3008 | /* Watchdog */ | ||
3009 | COMPATIBLE_IOCTL(WDIOC_GETSUPPORT) | ||
3010 | COMPATIBLE_IOCTL(WDIOC_GETSTATUS) | ||
3011 | COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS) | ||
3012 | COMPATIBLE_IOCTL(WDIOC_GETTEMP) | ||
3013 | COMPATIBLE_IOCTL(WDIOC_SETOPTIONS) | ||
3014 | COMPATIBLE_IOCTL(WDIOC_KEEPALIVE) | ||
3015 | COMPATIBLE_IOCTL(WDIOC_SETTIMEOUT) | ||
3016 | COMPATIBLE_IOCTL(WDIOC_GETTIMEOUT) | ||
3017 | /* Big R */ | ||
3018 | COMPATIBLE_IOCTL(RNDGETENTCNT) | ||
3019 | COMPATIBLE_IOCTL(RNDADDTOENTCNT) | ||
3020 | COMPATIBLE_IOCTL(RNDGETPOOL) | ||
3021 | COMPATIBLE_IOCTL(RNDADDENTROPY) | ||
3022 | COMPATIBLE_IOCTL(RNDZAPENTCNT) | ||
3023 | COMPATIBLE_IOCTL(RNDCLEARPOOL) | ||
3024 | /* Bluetooth */ | ||
3025 | COMPATIBLE_IOCTL(HCIDEVUP) | ||
3026 | COMPATIBLE_IOCTL(HCIDEVDOWN) | ||
3027 | COMPATIBLE_IOCTL(HCIDEVRESET) | ||
3028 | COMPATIBLE_IOCTL(HCIDEVRESTAT) | ||
3029 | COMPATIBLE_IOCTL(HCIGETDEVLIST) | ||
3030 | COMPATIBLE_IOCTL(HCIGETDEVINFO) | ||
3031 | COMPATIBLE_IOCTL(HCIGETCONNLIST) | ||
3032 | COMPATIBLE_IOCTL(HCIGETCONNINFO) | ||
3033 | COMPATIBLE_IOCTL(HCISETRAW) | ||
3034 | COMPATIBLE_IOCTL(HCISETSCAN) | ||
3035 | COMPATIBLE_IOCTL(HCISETAUTH) | ||
3036 | COMPATIBLE_IOCTL(HCISETENCRYPT) | ||
3037 | COMPATIBLE_IOCTL(HCISETPTYPE) | ||
3038 | COMPATIBLE_IOCTL(HCISETLINKPOL) | ||
3039 | COMPATIBLE_IOCTL(HCISETLINKMODE) | ||
3040 | COMPATIBLE_IOCTL(HCISETACLMTU) | ||
3041 | COMPATIBLE_IOCTL(HCISETSCOMTU) | ||
3042 | COMPATIBLE_IOCTL(HCIINQUIRY) | ||
3043 | COMPATIBLE_IOCTL(HCIUARTSETPROTO) | ||
3044 | COMPATIBLE_IOCTL(HCIUARTGETPROTO) | ||
3045 | COMPATIBLE_IOCTL(RFCOMMCREATEDEV) | ||
3046 | COMPATIBLE_IOCTL(RFCOMMRELEASEDEV) | ||
3047 | COMPATIBLE_IOCTL(RFCOMMGETDEVLIST) | ||
3048 | COMPATIBLE_IOCTL(RFCOMMGETDEVINFO) | ||
3049 | COMPATIBLE_IOCTL(RFCOMMSTEALDLC) | ||
3050 | COMPATIBLE_IOCTL(BNEPCONNADD) | ||
3051 | COMPATIBLE_IOCTL(BNEPCONNDEL) | ||
3052 | COMPATIBLE_IOCTL(BNEPGETCONNLIST) | ||
3053 | COMPATIBLE_IOCTL(BNEPGETCONNINFO) | ||
3054 | COMPATIBLE_IOCTL(CMTPCONNADD) | ||
3055 | COMPATIBLE_IOCTL(CMTPCONNDEL) | ||
3056 | COMPATIBLE_IOCTL(CMTPGETCONNLIST) | ||
3057 | COMPATIBLE_IOCTL(CMTPGETCONNINFO) | ||
3058 | COMPATIBLE_IOCTL(HIDPCONNADD) | ||
3059 | COMPATIBLE_IOCTL(HIDPCONNDEL) | ||
3060 | COMPATIBLE_IOCTL(HIDPGETCONNLIST) | ||
3061 | COMPATIBLE_IOCTL(HIDPGETCONNINFO) | ||
3062 | /* CAPI */ | ||
3063 | COMPATIBLE_IOCTL(CAPI_REGISTER) | ||
3064 | COMPATIBLE_IOCTL(CAPI_GET_MANUFACTURER) | ||
3065 | COMPATIBLE_IOCTL(CAPI_GET_VERSION) | ||
3066 | COMPATIBLE_IOCTL(CAPI_GET_SERIAL) | ||
3067 | COMPATIBLE_IOCTL(CAPI_GET_PROFILE) | ||
3068 | COMPATIBLE_IOCTL(CAPI_MANUFACTURER_CMD) | ||
3069 | COMPATIBLE_IOCTL(CAPI_GET_ERRCODE) | ||
3070 | COMPATIBLE_IOCTL(CAPI_INSTALLED) | ||
3071 | COMPATIBLE_IOCTL(CAPI_GET_FLAGS) | ||
3072 | COMPATIBLE_IOCTL(CAPI_SET_FLAGS) | ||
3073 | COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) | ||
3074 | COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) | ||
3075 | COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) | ||
3076 | /* Siemens Gigaset */ | ||
3077 | COMPATIBLE_IOCTL(GIGASET_REDIR) | ||
3078 | COMPATIBLE_IOCTL(GIGASET_CONFIG) | ||
3079 | COMPATIBLE_IOCTL(GIGASET_BRKCHARS) | ||
3080 | COMPATIBLE_IOCTL(GIGASET_VERSION) | ||
3081 | /* Misc. */ | ||
3082 | COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ | ||
3083 | COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ | ||
3084 | COMPATIBLE_IOCTL(PCIIOC_CONTROLLER) | ||
3085 | COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO) | ||
3086 | COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM) | ||
3087 | COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE) | ||
3088 | /* USB */ | ||
3089 | COMPATIBLE_IOCTL(USBDEVFS_RESETEP) | ||
3090 | COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE) | ||
3091 | COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION) | ||
3092 | COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER) | ||
3093 | COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB) | ||
3094 | COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE) | ||
3095 | COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE) | ||
3096 | COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO) | ||
3097 | COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO) | ||
3098 | COMPATIBLE_IOCTL(USBDEVFS_RESET) | ||
3099 | COMPATIBLE_IOCTL(USBDEVFS_SUBMITURB32) | ||
3100 | COMPATIBLE_IOCTL(USBDEVFS_REAPURB32) | ||
3101 | COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32) | ||
3102 | COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT) | ||
3103 | /* MTD */ | ||
3104 | COMPATIBLE_IOCTL(MEMGETINFO) | ||
3105 | COMPATIBLE_IOCTL(MEMERASE) | ||
3106 | COMPATIBLE_IOCTL(MEMLOCK) | ||
3107 | COMPATIBLE_IOCTL(MEMUNLOCK) | ||
3108 | COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) | ||
3109 | COMPATIBLE_IOCTL(MEMGETREGIONINFO) | ||
3110 | COMPATIBLE_IOCTL(MEMGETBADBLOCK) | ||
3111 | COMPATIBLE_IOCTL(MEMSETBADBLOCK) | ||
3112 | /* NBD */ | ||
3113 | ULONG_IOCTL(NBD_SET_SOCK) | ||
3114 | ULONG_IOCTL(NBD_SET_BLKSIZE) | ||
3115 | ULONG_IOCTL(NBD_SET_SIZE) | ||
3116 | COMPATIBLE_IOCTL(NBD_DO_IT) | ||
3117 | COMPATIBLE_IOCTL(NBD_CLEAR_SOCK) | ||
3118 | COMPATIBLE_IOCTL(NBD_CLEAR_QUE) | ||
3119 | COMPATIBLE_IOCTL(NBD_PRINT_DEBUG) | ||
3120 | ULONG_IOCTL(NBD_SET_SIZE_BLOCKS) | ||
3121 | COMPATIBLE_IOCTL(NBD_DISCONNECT) | ||
3122 | /* i2c */ | ||
3123 | COMPATIBLE_IOCTL(I2C_SLAVE) | ||
3124 | COMPATIBLE_IOCTL(I2C_SLAVE_FORCE) | ||
3125 | COMPATIBLE_IOCTL(I2C_TENBIT) | ||
3126 | COMPATIBLE_IOCTL(I2C_PEC) | ||
3127 | COMPATIBLE_IOCTL(I2C_RETRIES) | ||
3128 | COMPATIBLE_IOCTL(I2C_TIMEOUT) | ||
3129 | /* wireless */ | ||
3130 | COMPATIBLE_IOCTL(SIOCSIWCOMMIT) | ||
3131 | COMPATIBLE_IOCTL(SIOCGIWNAME) | ||
3132 | COMPATIBLE_IOCTL(SIOCSIWNWID) | ||
3133 | COMPATIBLE_IOCTL(SIOCGIWNWID) | ||
3134 | COMPATIBLE_IOCTL(SIOCSIWFREQ) | ||
3135 | COMPATIBLE_IOCTL(SIOCGIWFREQ) | ||
3136 | COMPATIBLE_IOCTL(SIOCSIWMODE) | ||
3137 | COMPATIBLE_IOCTL(SIOCGIWMODE) | ||
3138 | COMPATIBLE_IOCTL(SIOCSIWSENS) | ||
3139 | COMPATIBLE_IOCTL(SIOCGIWSENS) | ||
3140 | COMPATIBLE_IOCTL(SIOCSIWRANGE) | ||
3141 | COMPATIBLE_IOCTL(SIOCSIWPRIV) | ||
3142 | COMPATIBLE_IOCTL(SIOCGIWPRIV) | ||
3143 | COMPATIBLE_IOCTL(SIOCSIWSTATS) | ||
3144 | COMPATIBLE_IOCTL(SIOCGIWSTATS) | ||
3145 | COMPATIBLE_IOCTL(SIOCSIWAP) | ||
3146 | COMPATIBLE_IOCTL(SIOCGIWAP) | ||
3147 | COMPATIBLE_IOCTL(SIOCSIWSCAN) | ||
3148 | COMPATIBLE_IOCTL(SIOCSIWRATE) | ||
3149 | COMPATIBLE_IOCTL(SIOCGIWRATE) | ||
3150 | COMPATIBLE_IOCTL(SIOCSIWRTS) | ||
3151 | COMPATIBLE_IOCTL(SIOCGIWRTS) | ||
3152 | COMPATIBLE_IOCTL(SIOCSIWFRAG) | ||
3153 | COMPATIBLE_IOCTL(SIOCGIWFRAG) | ||
3154 | COMPATIBLE_IOCTL(SIOCSIWTXPOW) | ||
3155 | COMPATIBLE_IOCTL(SIOCGIWTXPOW) | ||
3156 | COMPATIBLE_IOCTL(SIOCSIWRETRY) | ||
3157 | COMPATIBLE_IOCTL(SIOCGIWRETRY) | ||
3158 | COMPATIBLE_IOCTL(SIOCSIWPOWER) | ||
3159 | COMPATIBLE_IOCTL(SIOCGIWPOWER) | ||
3160 | /* hiddev */ | ||
3161 | COMPATIBLE_IOCTL(HIDIOCGVERSION) | ||
3162 | COMPATIBLE_IOCTL(HIDIOCAPPLICATION) | ||
3163 | COMPATIBLE_IOCTL(HIDIOCGDEVINFO) | ||
3164 | COMPATIBLE_IOCTL(HIDIOCGSTRING) | ||
3165 | COMPATIBLE_IOCTL(HIDIOCINITREPORT) | ||
3166 | COMPATIBLE_IOCTL(HIDIOCGREPORT) | ||
3167 | COMPATIBLE_IOCTL(HIDIOCSREPORT) | ||
3168 | COMPATIBLE_IOCTL(HIDIOCGREPORTINFO) | ||
3169 | COMPATIBLE_IOCTL(HIDIOCGFIELDINFO) | ||
3170 | COMPATIBLE_IOCTL(HIDIOCGUSAGE) | ||
3171 | COMPATIBLE_IOCTL(HIDIOCSUSAGE) | ||
3172 | COMPATIBLE_IOCTL(HIDIOCGUCODE) | ||
3173 | COMPATIBLE_IOCTL(HIDIOCGFLAG) | ||
3174 | COMPATIBLE_IOCTL(HIDIOCSFLAG) | ||
3175 | COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINDEX) | ||
3176 | COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINFO) | ||
3177 | /* dvb */ | ||
3178 | COMPATIBLE_IOCTL(AUDIO_STOP) | ||
3179 | COMPATIBLE_IOCTL(AUDIO_PLAY) | ||
3180 | COMPATIBLE_IOCTL(AUDIO_PAUSE) | ||
3181 | COMPATIBLE_IOCTL(AUDIO_CONTINUE) | ||
3182 | COMPATIBLE_IOCTL(AUDIO_SELECT_SOURCE) | ||
3183 | COMPATIBLE_IOCTL(AUDIO_SET_MUTE) | ||
3184 | COMPATIBLE_IOCTL(AUDIO_SET_AV_SYNC) | ||
3185 | COMPATIBLE_IOCTL(AUDIO_SET_BYPASS_MODE) | ||
3186 | COMPATIBLE_IOCTL(AUDIO_CHANNEL_SELECT) | ||
3187 | COMPATIBLE_IOCTL(AUDIO_GET_STATUS) | ||
3188 | COMPATIBLE_IOCTL(AUDIO_GET_CAPABILITIES) | ||
3189 | COMPATIBLE_IOCTL(AUDIO_CLEAR_BUFFER) | ||
3190 | COMPATIBLE_IOCTL(AUDIO_SET_ID) | ||
3191 | COMPATIBLE_IOCTL(AUDIO_SET_MIXER) | ||
3192 | COMPATIBLE_IOCTL(AUDIO_SET_STREAMTYPE) | ||
3193 | COMPATIBLE_IOCTL(AUDIO_SET_EXT_ID) | ||
3194 | COMPATIBLE_IOCTL(AUDIO_SET_ATTRIBUTES) | ||
3195 | COMPATIBLE_IOCTL(AUDIO_SET_KARAOKE) | ||
3196 | COMPATIBLE_IOCTL(DMX_START) | ||
3197 | COMPATIBLE_IOCTL(DMX_STOP) | ||
3198 | COMPATIBLE_IOCTL(DMX_SET_FILTER) | ||
3199 | COMPATIBLE_IOCTL(DMX_SET_PES_FILTER) | ||
3200 | COMPATIBLE_IOCTL(DMX_SET_BUFFER_SIZE) | ||
3201 | COMPATIBLE_IOCTL(DMX_GET_PES_PIDS) | ||
3202 | COMPATIBLE_IOCTL(DMX_GET_CAPS) | ||
3203 | COMPATIBLE_IOCTL(DMX_SET_SOURCE) | ||
3204 | COMPATIBLE_IOCTL(DMX_GET_STC) | ||
3205 | COMPATIBLE_IOCTL(FE_GET_INFO) | ||
3206 | COMPATIBLE_IOCTL(FE_DISEQC_RESET_OVERLOAD) | ||
3207 | COMPATIBLE_IOCTL(FE_DISEQC_SEND_MASTER_CMD) | ||
3208 | COMPATIBLE_IOCTL(FE_DISEQC_RECV_SLAVE_REPLY) | ||
3209 | COMPATIBLE_IOCTL(FE_DISEQC_SEND_BURST) | ||
3210 | COMPATIBLE_IOCTL(FE_SET_TONE) | ||
3211 | COMPATIBLE_IOCTL(FE_SET_VOLTAGE) | ||
3212 | COMPATIBLE_IOCTL(FE_ENABLE_HIGH_LNB_VOLTAGE) | ||
3213 | COMPATIBLE_IOCTL(FE_READ_STATUS) | ||
3214 | COMPATIBLE_IOCTL(FE_READ_BER) | ||
3215 | COMPATIBLE_IOCTL(FE_READ_SIGNAL_STRENGTH) | ||
3216 | COMPATIBLE_IOCTL(FE_READ_SNR) | ||
3217 | COMPATIBLE_IOCTL(FE_READ_UNCORRECTED_BLOCKS) | ||
3218 | COMPATIBLE_IOCTL(FE_SET_FRONTEND) | ||
3219 | COMPATIBLE_IOCTL(FE_GET_FRONTEND) | ||
3220 | COMPATIBLE_IOCTL(FE_GET_EVENT) | ||
3221 | COMPATIBLE_IOCTL(FE_DISHNETWORK_SEND_LEGACY_CMD) | ||
3222 | COMPATIBLE_IOCTL(VIDEO_STOP) | ||
3223 | COMPATIBLE_IOCTL(VIDEO_PLAY) | ||
3224 | COMPATIBLE_IOCTL(VIDEO_FREEZE) | ||
3225 | COMPATIBLE_IOCTL(VIDEO_CONTINUE) | ||
3226 | COMPATIBLE_IOCTL(VIDEO_SELECT_SOURCE) | ||
3227 | COMPATIBLE_IOCTL(VIDEO_SET_BLANK) | ||
3228 | COMPATIBLE_IOCTL(VIDEO_GET_STATUS) | ||
3229 | COMPATIBLE_IOCTL(VIDEO_SET_DISPLAY_FORMAT) | ||
3230 | COMPATIBLE_IOCTL(VIDEO_FAST_FORWARD) | ||
3231 | COMPATIBLE_IOCTL(VIDEO_SLOWMOTION) | ||
3232 | COMPATIBLE_IOCTL(VIDEO_GET_CAPABILITIES) | ||
3233 | COMPATIBLE_IOCTL(VIDEO_CLEAR_BUFFER) | ||
3234 | COMPATIBLE_IOCTL(VIDEO_SET_ID) | ||
3235 | COMPATIBLE_IOCTL(VIDEO_SET_STREAMTYPE) | ||
3236 | COMPATIBLE_IOCTL(VIDEO_SET_FORMAT) | ||
3237 | COMPATIBLE_IOCTL(VIDEO_SET_SYSTEM) | ||
3238 | COMPATIBLE_IOCTL(VIDEO_SET_HIGHLIGHT) | ||
3239 | COMPATIBLE_IOCTL(VIDEO_SET_SPU) | ||
3240 | COMPATIBLE_IOCTL(VIDEO_GET_NAVI) | ||
3241 | COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES) | ||
3242 | COMPATIBLE_IOCTL(VIDEO_GET_SIZE) | ||
3243 | COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE) | ||
3244 | |||
3245 | /* now things that need handlers */ | ||
2402 | HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) | 3246 | HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) |
2403 | HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) | 3247 | HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) |
2404 | #ifdef CONFIG_NET | 3248 | #ifdef CONFIG_NET |
@@ -2594,6 +3438,8 @@ HANDLE_IOCTL(SIOCGIWENCODEEXT, do_wireless_ioctl) | |||
2594 | HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl) | 3438 | HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl) |
2595 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) | 3439 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) |
2596 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) | 3440 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) |
3441 | /* Not implemented in the native kernel */ | ||
3442 | IGNORE_IOCTL(SIOCGIFCOUNT) | ||
2597 | HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl) | 3443 | HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl) |
2598 | HANDLE_IOCTL(RTC_IRQP_SET32, rtc_ioctl) | 3444 | HANDLE_IOCTL(RTC_IRQP_SET32, rtc_ioctl) |
2599 | HANDLE_IOCTL(RTC_EPOCH_READ32, rtc_ioctl) | 3445 | HANDLE_IOCTL(RTC_EPOCH_READ32, rtc_ioctl) |
@@ -2617,6 +3463,167 @@ COMPATIBLE_IOCTL(LPRESET) | |||
2617 | /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/ | 3463 | /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/ |
2618 | COMPATIBLE_IOCTL(LPGETFLAGS) | 3464 | COMPATIBLE_IOCTL(LPGETFLAGS) |
2619 | HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans) | 3465 | HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans) |
3466 | |||
3467 | /* fat 'r' ioctls. These are handled by fat with ->compat_ioctl, | ||
3468 | but we don't want warnings on other file systems. So declare | ||
3469 | them as compatible here. */ | ||
3470 | #define VFAT_IOCTL_READDIR_BOTH32 _IOR('r', 1, struct compat_dirent[2]) | ||
3471 | #define VFAT_IOCTL_READDIR_SHORT32 _IOR('r', 2, struct compat_dirent[2]) | ||
3472 | |||
3473 | IGNORE_IOCTL(VFAT_IOCTL_READDIR_BOTH32) | ||
3474 | IGNORE_IOCTL(VFAT_IOCTL_READDIR_SHORT32) | ||
2620 | }; | 3475 | }; |
2621 | 3476 | ||
2622 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); | 3477 | #define IOCTL_HASHSIZE 256 |
3478 | static struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE]; | ||
3479 | |||
3480 | static inline unsigned long ioctl32_hash(unsigned long cmd) | ||
3481 | { | ||
3482 | return (((cmd >> 6) ^ (cmd >> 4) ^ cmd)) % IOCTL_HASHSIZE; | ||
3483 | } | ||
3484 | |||
3485 | static void compat_ioctl_error(struct file *filp, unsigned int fd, | ||
3486 | unsigned int cmd, unsigned long arg) | ||
3487 | { | ||
3488 | char buf[10]; | ||
3489 | char *fn = "?"; | ||
3490 | char *path; | ||
3491 | |||
3492 | /* find the name of the device. */ | ||
3493 | path = (char *)__get_free_page(GFP_KERNEL); | ||
3494 | if (path) { | ||
3495 | fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, PAGE_SIZE); | ||
3496 | if (IS_ERR(fn)) | ||
3497 | fn = "?"; | ||
3498 | } | ||
3499 | |||
3500 | sprintf(buf,"'%c'", (cmd>>_IOC_TYPESHIFT) & _IOC_TYPEMASK); | ||
3501 | if (!isprint(buf[1])) | ||
3502 | sprintf(buf, "%02x", buf[1]); | ||
3503 | compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) " | ||
3504 | "cmd(%08x){t:%s;sz:%u} arg(%08x) on %s\n", | ||
3505 | current->comm, current->pid, | ||
3506 | (int)fd, (unsigned int)cmd, buf, | ||
3507 | (cmd >> _IOC_SIZESHIFT) & _IOC_SIZEMASK, | ||
3508 | (unsigned int)arg, fn); | ||
3509 | |||
3510 | if (path) | ||
3511 | free_page((unsigned long)path); | ||
3512 | } | ||
3513 | |||
3514 | asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, | ||
3515 | unsigned long arg) | ||
3516 | { | ||
3517 | struct file *filp; | ||
3518 | int error = -EBADF; | ||
3519 | struct ioctl_trans *t; | ||
3520 | int fput_needed; | ||
3521 | |||
3522 | filp = fget_light(fd, &fput_needed); | ||
3523 | if (!filp) | ||
3524 | goto out; | ||
3525 | |||
3526 | /* RED-PEN how should LSM module know it's handling 32bit? */ | ||
3527 | error = security_file_ioctl(filp, cmd, arg); | ||
3528 | if (error) | ||
3529 | goto out_fput; | ||
3530 | |||
3531 | /* | ||
3532 | * To allow the compat_ioctl handlers to be self contained | ||
3533 | * we need to check the common ioctls here first. | ||
3534 | * Just handle them with the standard handlers below. | ||
3535 | */ | ||
3536 | switch (cmd) { | ||
3537 | case FIOCLEX: | ||
3538 | case FIONCLEX: | ||
3539 | case FIONBIO: | ||
3540 | case FIOASYNC: | ||
3541 | case FIOQSIZE: | ||
3542 | break; | ||
3543 | |||
3544 | case FIBMAP: | ||
3545 | case FIGETBSZ: | ||
3546 | case FIONREAD: | ||
3547 | if (S_ISREG(filp->f_path.dentry->d_inode->i_mode)) | ||
3548 | break; | ||
3549 | /*FALL THROUGH*/ | ||
3550 | |||
3551 | default: | ||
3552 | if (filp->f_op && filp->f_op->compat_ioctl) { | ||
3553 | error = filp->f_op->compat_ioctl(filp, cmd, arg); | ||
3554 | if (error != -ENOIOCTLCMD) | ||
3555 | goto out_fput; | ||
3556 | } | ||
3557 | |||
3558 | if (!filp->f_op || | ||
3559 | (!filp->f_op->ioctl && !filp->f_op->unlocked_ioctl)) | ||
3560 | goto do_ioctl; | ||
3561 | break; | ||
3562 | } | ||
3563 | |||
3564 | for (t = ioctl32_hash_table[ioctl32_hash(cmd)]; t; t = t->next) { | ||
3565 | if (t->cmd == cmd) | ||
3566 | goto found_handler; | ||
3567 | } | ||
3568 | |||
3569 | if (S_ISSOCK(filp->f_path.dentry->d_inode->i_mode) && | ||
3570 | cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { | ||
3571 | error = siocdevprivate_ioctl(fd, cmd, arg); | ||
3572 | } else { | ||
3573 | static int count; | ||
3574 | |||
3575 | if (++count <= 50) | ||
3576 | compat_ioctl_error(filp, fd, cmd, arg); | ||
3577 | error = -EINVAL; | ||
3578 | } | ||
3579 | |||
3580 | goto out_fput; | ||
3581 | |||
3582 | found_handler: | ||
3583 | if (t->handler) { | ||
3584 | lock_kernel(); | ||
3585 | error = t->handler(fd, cmd, arg, filp); | ||
3586 | unlock_kernel(); | ||
3587 | goto out_fput; | ||
3588 | } | ||
3589 | |||
3590 | do_ioctl: | ||
3591 | error = vfs_ioctl(filp, fd, cmd, arg); | ||
3592 | out_fput: | ||
3593 | fput_light(filp, fput_needed); | ||
3594 | out: | ||
3595 | return error; | ||
3596 | } | ||
3597 | |||
3598 | static void ioctl32_insert_translation(struct ioctl_trans *trans) | ||
3599 | { | ||
3600 | unsigned long hash; | ||
3601 | struct ioctl_trans *t; | ||
3602 | |||
3603 | hash = ioctl32_hash (trans->cmd); | ||
3604 | if (!ioctl32_hash_table[hash]) | ||
3605 | ioctl32_hash_table[hash] = trans; | ||
3606 | else { | ||
3607 | t = ioctl32_hash_table[hash]; | ||
3608 | while (t->next) | ||
3609 | t = t->next; | ||
3610 | trans->next = NULL; | ||
3611 | t->next = trans; | ||
3612 | } | ||
3613 | } | ||
3614 | |||
3615 | static int __init init_sys32_ioctl(void) | ||
3616 | { | ||
3617 | int i; | ||
3618 | |||
3619 | for (i = 0; i < ARRAY_SIZE(ioctl_start); i++) { | ||
3620 | if (ioctl_start[i].next != 0) { | ||
3621 | printk("ioctl translation %d bad\n",i); | ||
3622 | return -1; | ||
3623 | } | ||
3624 | |||
3625 | ioctl32_insert_translation(&ioctl_start[i]); | ||
3626 | } | ||
3627 | return 0; | ||
3628 | } | ||
3629 | __initcall(init_sys32_ioctl); | ||