diff options
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index c5ded5ff72b5..c135202c38b3 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -94,7 +94,6 @@ | |||
94 | #include <linux/atm_tcp.h> | 94 | #include <linux/atm_tcp.h> |
95 | #include <linux/sonet.h> | 95 | #include <linux/sonet.h> |
96 | #include <linux/atm_suni.h> | 96 | #include <linux/atm_suni.h> |
97 | #include <linux/mtd/mtd.h> | ||
98 | 97 | ||
99 | #include <linux/usb.h> | 98 | #include <linux/usb.h> |
100 | #include <linux/usbdevice_fs.h> | 99 | #include <linux/usbdevice_fs.h> |
@@ -1405,46 +1404,6 @@ static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
1405 | #define HIDPGETCONNLIST _IOR('H', 210, int) | 1404 | #define HIDPGETCONNLIST _IOR('H', 210, int) |
1406 | #define HIDPGETCONNINFO _IOR('H', 211, int) | 1405 | #define HIDPGETCONNINFO _IOR('H', 211, int) |
1407 | 1406 | ||
1408 | struct mtd_oob_buf32 { | ||
1409 | u_int32_t start; | ||
1410 | u_int32_t length; | ||
1411 | compat_caddr_t ptr; /* unsigned char* */ | ||
1412 | }; | ||
1413 | |||
1414 | #define MEMWRITEOOB32 _IOWR('M',3,struct mtd_oob_buf32) | ||
1415 | #define MEMREADOOB32 _IOWR('M',4,struct mtd_oob_buf32) | ||
1416 | |||
1417 | static int mtd_rw_oob(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1418 | { | ||
1419 | struct mtd_oob_buf __user *buf = compat_alloc_user_space(sizeof(*buf)); | ||
1420 | struct mtd_oob_buf32 __user *buf32 = compat_ptr(arg); | ||
1421 | u32 data; | ||
1422 | char __user *datap; | ||
1423 | unsigned int real_cmd; | ||
1424 | int err; | ||
1425 | |||
1426 | real_cmd = (cmd == MEMREADOOB32) ? | ||
1427 | MEMREADOOB : MEMWRITEOOB; | ||
1428 | |||
1429 | if (copy_in_user(&buf->start, &buf32->start, | ||
1430 | 2 * sizeof(u32)) || | ||
1431 | get_user(data, &buf32->ptr)) | ||
1432 | return -EFAULT; | ||
1433 | datap = compat_ptr(data); | ||
1434 | if (put_user(datap, &buf->ptr)) | ||
1435 | return -EFAULT; | ||
1436 | |||
1437 | err = sys_ioctl(fd, real_cmd, (unsigned long) buf); | ||
1438 | |||
1439 | if (!err) { | ||
1440 | if (copy_in_user(&buf32->start, &buf->start, | ||
1441 | 2 * sizeof(u32))) | ||
1442 | err = -EFAULT; | ||
1443 | } | ||
1444 | |||
1445 | return err; | ||
1446 | } | ||
1447 | |||
1448 | #ifdef CONFIG_BLOCK | 1407 | #ifdef CONFIG_BLOCK |
1449 | struct raw32_config_request | 1408 | struct raw32_config_request |
1450 | { | 1409 | { |
@@ -2426,15 +2385,6 @@ COMPATIBLE_IOCTL(USBDEVFS_SUBMITURB32) | |||
2426 | COMPATIBLE_IOCTL(USBDEVFS_REAPURB32) | 2385 | COMPATIBLE_IOCTL(USBDEVFS_REAPURB32) |
2427 | COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32) | 2386 | COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32) |
2428 | COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT) | 2387 | COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT) |
2429 | /* MTD */ | ||
2430 | COMPATIBLE_IOCTL(MEMGETINFO) | ||
2431 | COMPATIBLE_IOCTL(MEMERASE) | ||
2432 | COMPATIBLE_IOCTL(MEMLOCK) | ||
2433 | COMPATIBLE_IOCTL(MEMUNLOCK) | ||
2434 | COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) | ||
2435 | COMPATIBLE_IOCTL(MEMGETREGIONINFO) | ||
2436 | COMPATIBLE_IOCTL(MEMGETBADBLOCK) | ||
2437 | COMPATIBLE_IOCTL(MEMSETBADBLOCK) | ||
2438 | /* NBD */ | 2388 | /* NBD */ |
2439 | ULONG_IOCTL(NBD_SET_SOCK) | 2389 | ULONG_IOCTL(NBD_SET_SOCK) |
2440 | ULONG_IOCTL(NBD_SET_BLKSIZE) | 2390 | ULONG_IOCTL(NBD_SET_BLKSIZE) |
@@ -2544,8 +2494,6 @@ COMPATIBLE_IOCTL(JSIOCGBUTTONS) | |||
2544 | COMPATIBLE_IOCTL(JSIOCGNAME(0)) | 2494 | COMPATIBLE_IOCTL(JSIOCGNAME(0)) |
2545 | 2495 | ||
2546 | /* now things that need handlers */ | 2496 | /* now things that need handlers */ |
2547 | HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) | ||
2548 | HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) | ||
2549 | #ifdef CONFIG_NET | 2497 | #ifdef CONFIG_NET |
2550 | HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32) | 2498 | HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32) |
2551 | HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf) | 2499 | HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf) |