diff options
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index c68b055fa26e..464c04a9541d 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -2396,6 +2396,14 @@ lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
2396 | #define ULONG_IOCTL(cmd) \ | 2396 | #define ULONG_IOCTL(cmd) \ |
2397 | { (cmd), (ioctl_trans_handler_t)sys_ioctl }, | 2397 | { (cmd), (ioctl_trans_handler_t)sys_ioctl }, |
2398 | 2398 | ||
2399 | /* ioctl should not be warned about even if it's not implemented. | ||
2400 | Valid reasons to use this: | ||
2401 | - It is implemented with ->compat_ioctl on some device, but programs | ||
2402 | call it on others too. | ||
2403 | - The ioctl is not implemented in the native kernel, but programs | ||
2404 | call it commonly anyways. | ||
2405 | Most other reasons are not valid. */ | ||
2406 | #define IGNORE_IOCTL(cmd) COMPATIBLE_IOCTL(cmd) | ||
2399 | 2407 | ||
2400 | struct ioctl_trans ioctl_start[] = { | 2408 | struct ioctl_trans ioctl_start[] = { |
2401 | #include <linux/compat_ioctl.h> | 2409 | #include <linux/compat_ioctl.h> |
@@ -2594,6 +2602,8 @@ HANDLE_IOCTL(SIOCGIWENCODEEXT, do_wireless_ioctl) | |||
2594 | HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl) | 2602 | HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl) |
2595 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) | 2603 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) |
2596 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) | 2604 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) |
2605 | /* Not implemented in the native kernel */ | ||
2606 | IGNORE_IOCTL(SIOCGIFCOUNT) | ||
2597 | HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl) | 2607 | HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl) |
2598 | HANDLE_IOCTL(RTC_IRQP_SET32, rtc_ioctl) | 2608 | HANDLE_IOCTL(RTC_IRQP_SET32, rtc_ioctl) |
2599 | HANDLE_IOCTL(RTC_EPOCH_READ32, rtc_ioctl) | 2609 | HANDLE_IOCTL(RTC_EPOCH_READ32, rtc_ioctl) |
@@ -2617,6 +2627,15 @@ COMPATIBLE_IOCTL(LPRESET) | |||
2617 | /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/ | 2627 | /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/ |
2618 | COMPATIBLE_IOCTL(LPGETFLAGS) | 2628 | COMPATIBLE_IOCTL(LPGETFLAGS) |
2619 | HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans) | 2629 | HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans) |
2630 | |||
2631 | /* fat 'r' ioctls. These are handled by fat with ->compat_ioctl, | ||
2632 | but we don't want warnings on other file systems. So declare | ||
2633 | them as compatible here. */ | ||
2634 | #define VFAT_IOCTL_READDIR_BOTH32 _IOR('r', 1, struct compat_dirent[2]) | ||
2635 | #define VFAT_IOCTL_READDIR_SHORT32 _IOR('r', 2, struct compat_dirent[2]) | ||
2636 | |||
2637 | IGNORE_IOCTL(VFAT_IOCTL_READDIR_BOTH32) | ||
2638 | IGNORE_IOCTL(VFAT_IOCTL_READDIR_SHORT32) | ||
2620 | }; | 2639 | }; |
2621 | 2640 | ||
2622 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); | 2641 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); |