diff options
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index e5eb0f10f05a..e1a56437040a 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -108,7 +108,6 @@ | |||
108 | #include <linux/nbd.h> | 108 | #include <linux/nbd.h> |
109 | #include <linux/random.h> | 109 | #include <linux/random.h> |
110 | #include <linux/filter.h> | 110 | #include <linux/filter.h> |
111 | #include <linux/msdos_fs.h> | ||
112 | #include <linux/pktcdvd.h> | 111 | #include <linux/pktcdvd.h> |
113 | 112 | ||
114 | #include <linux/hiddev.h> | 113 | #include <linux/hiddev.h> |
@@ -1937,51 +1936,6 @@ static int mtd_rw_oob(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
1937 | return err; | 1936 | return err; |
1938 | } | 1937 | } |
1939 | 1938 | ||
1940 | #define VFAT_IOCTL_READDIR_BOTH32 _IOR('r', 1, struct compat_dirent[2]) | ||
1941 | #define VFAT_IOCTL_READDIR_SHORT32 _IOR('r', 2, struct compat_dirent[2]) | ||
1942 | |||
1943 | static long | ||
1944 | put_dirent32 (struct dirent *d, struct compat_dirent __user *d32) | ||
1945 | { | ||
1946 | if (!access_ok(VERIFY_WRITE, d32, sizeof(struct compat_dirent))) | ||
1947 | return -EFAULT; | ||
1948 | |||
1949 | __put_user(d->d_ino, &d32->d_ino); | ||
1950 | __put_user(d->d_off, &d32->d_off); | ||
1951 | __put_user(d->d_reclen, &d32->d_reclen); | ||
1952 | if (__copy_to_user(d32->d_name, d->d_name, d->d_reclen)) | ||
1953 | return -EFAULT; | ||
1954 | |||
1955 | return 0; | ||
1956 | } | ||
1957 | |||
1958 | static int vfat_ioctl32(unsigned fd, unsigned cmd, unsigned long arg) | ||
1959 | { | ||
1960 | struct compat_dirent __user *p = compat_ptr(arg); | ||
1961 | int ret; | ||
1962 | mm_segment_t oldfs = get_fs(); | ||
1963 | struct dirent d[2]; | ||
1964 | |||
1965 | switch(cmd) | ||
1966 | { | ||
1967 | case VFAT_IOCTL_READDIR_BOTH32: | ||
1968 | cmd = VFAT_IOCTL_READDIR_BOTH; | ||
1969 | break; | ||
1970 | case VFAT_IOCTL_READDIR_SHORT32: | ||
1971 | cmd = VFAT_IOCTL_READDIR_SHORT; | ||
1972 | break; | ||
1973 | } | ||
1974 | |||
1975 | set_fs(KERNEL_DS); | ||
1976 | ret = sys_ioctl(fd,cmd,(unsigned long)&d); | ||
1977 | set_fs(oldfs); | ||
1978 | if (ret >= 0) { | ||
1979 | ret |= put_dirent32(&d[0], p); | ||
1980 | ret |= put_dirent32(&d[1], p + 1); | ||
1981 | } | ||
1982 | return ret; | ||
1983 | } | ||
1984 | |||
1985 | struct raw32_config_request | 1939 | struct raw32_config_request |
1986 | { | 1940 | { |
1987 | compat_int_t raw_minor; | 1941 | compat_int_t raw_minor; |
@@ -2726,9 +2680,6 @@ HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl) | |||
2726 | HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget) | 2680 | HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget) |
2727 | HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset) | 2681 | HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset) |
2728 | HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64) | 2682 | HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64) |
2729 | /* vfat */ | ||
2730 | HANDLE_IOCTL(VFAT_IOCTL_READDIR_BOTH32, vfat_ioctl32) | ||
2731 | HANDLE_IOCTL(VFAT_IOCTL_READDIR_SHORT32, vfat_ioctl32) | ||
2732 | /* Raw devices */ | 2683 | /* Raw devices */ |
2733 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) | 2684 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) |
2734 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) | 2685 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) |