diff options
author | Arnd Bergmann <arnd@arndb.de> | 2007-10-09 07:23:51 -0400 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-10-10 03:26:00 -0400 |
commit | f58c4c0a17e500e767473598b3deafaa1d64051d (patch) | |
tree | f8fbf3a2ce10a9fccf41f2f96bca1ca71b3dd77e /fs | |
parent | d2bbf3da3759d04cd5836955cc59c8ae96092831 (diff) |
compat_ioctl: move common block ioctls to compat_blkdev_ioctl
Make compat_blkdev_ioctl and blkdev_ioctl reflect the respective
native versions. This is somewhat more efficient and makes it easier
to keep the two in sync.
Also get rid of the bogus handling for broken_blkgetsize and the
duplicate entry for BLKRASET.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat_ioctl.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 37310b0e8107..6be121868c60 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -1537,12 +1537,6 @@ ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
1537 | } | 1537 | } |
1538 | 1538 | ||
1539 | #ifdef CONFIG_BLOCK | 1539 | #ifdef CONFIG_BLOCK |
1540 | static int broken_blkgetsize(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1541 | { | ||
1542 | /* The mkswap binary hard codes it to Intel value :-((( */ | ||
1543 | return w_long(fd, BLKGETSIZE, arg); | ||
1544 | } | ||
1545 | |||
1546 | struct blkpg_ioctl_arg32 { | 1540 | struct blkpg_ioctl_arg32 { |
1547 | compat_int_t op; | 1541 | compat_int_t op; |
1548 | compat_int_t flags; | 1542 | compat_int_t flags; |
@@ -1578,29 +1572,6 @@ static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
1578 | return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg); | 1572 | return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg); |
1579 | } | 1573 | } |
1580 | 1574 | ||
1581 | #ifdef CONFIG_BLOCK | ||
1582 | /* Fix sizeof(sizeof()) breakage */ | ||
1583 | #define BLKBSZGET_32 _IOR(0x12,112,int) | ||
1584 | #define BLKBSZSET_32 _IOW(0x12,113,int) | ||
1585 | #define BLKGETSIZE64_32 _IOR(0x12,114,int) | ||
1586 | |||
1587 | static int do_blkbszget(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1588 | { | ||
1589 | return sys_ioctl(fd, BLKBSZGET, (unsigned long)compat_ptr(arg)); | ||
1590 | } | ||
1591 | |||
1592 | static int do_blkbszset(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1593 | { | ||
1594 | return sys_ioctl(fd, BLKBSZSET, (unsigned long)compat_ptr(arg)); | ||
1595 | } | ||
1596 | |||
1597 | static int do_blkgetsize64(unsigned int fd, unsigned int cmd, | ||
1598 | unsigned long arg) | ||
1599 | { | ||
1600 | return sys_ioctl(fd, BLKGETSIZE64, (unsigned long)compat_ptr(arg)); | ||
1601 | } | ||
1602 | #endif | ||
1603 | |||
1604 | /* Bluetooth ioctls */ | 1575 | /* Bluetooth ioctls */ |
1605 | #define HCIUARTSETPROTO _IOW('U', 200, int) | 1576 | #define HCIUARTSETPROTO _IOW('U', 200, int) |
1606 | #define HCIUARTGETPROTO _IOR('U', 201, int) | 1577 | #define HCIUARTGETPROTO _IOR('U', 201, int) |
@@ -2546,19 +2517,11 @@ COMPATIBLE_IOCTL(FDFMTTRK) | |||
2546 | COMPATIBLE_IOCTL(FDRAWCMD) | 2517 | COMPATIBLE_IOCTL(FDRAWCMD) |
2547 | /* 0x12 */ | 2518 | /* 0x12 */ |
2548 | #ifdef CONFIG_BLOCK | 2519 | #ifdef CONFIG_BLOCK |
2549 | COMPATIBLE_IOCTL(BLKRASET) | ||
2550 | COMPATIBLE_IOCTL(BLKROSET) | ||
2551 | COMPATIBLE_IOCTL(BLKROGET) | ||
2552 | COMPATIBLE_IOCTL(BLKRRPART) | ||
2553 | COMPATIBLE_IOCTL(BLKFLSBUF) | ||
2554 | COMPATIBLE_IOCTL(BLKSECTSET) | 2520 | COMPATIBLE_IOCTL(BLKSECTSET) |
2555 | COMPATIBLE_IOCTL(BLKSSZGET) | ||
2556 | COMPATIBLE_IOCTL(BLKTRACESTART) | 2521 | COMPATIBLE_IOCTL(BLKTRACESTART) |
2557 | COMPATIBLE_IOCTL(BLKTRACESTOP) | 2522 | COMPATIBLE_IOCTL(BLKTRACESTOP) |
2558 | COMPATIBLE_IOCTL(BLKTRACESETUP) | 2523 | COMPATIBLE_IOCTL(BLKTRACESETUP) |
2559 | COMPATIBLE_IOCTL(BLKTRACETEARDOWN) | 2524 | COMPATIBLE_IOCTL(BLKTRACETEARDOWN) |
2560 | ULONG_IOCTL(BLKRASET) | ||
2561 | ULONG_IOCTL(BLKFRASET) | ||
2562 | #endif | 2525 | #endif |
2563 | /* RAID */ | 2526 | /* RAID */ |
2564 | COMPATIBLE_IOCTL(RAID_VERSION) | 2527 | COMPATIBLE_IOCTL(RAID_VERSION) |
@@ -3337,11 +3300,6 @@ HANDLE_IOCTL(SIOCGSTAMPNS, do_siocgstampns) | |||
3337 | #endif | 3300 | #endif |
3338 | #ifdef CONFIG_BLOCK | 3301 | #ifdef CONFIG_BLOCK |
3339 | HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo) | 3302 | HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo) |
3340 | HANDLE_IOCTL(BLKRAGET, w_long) | ||
3341 | HANDLE_IOCTL(BLKGETSIZE, w_long) | ||
3342 | HANDLE_IOCTL(0x1260, broken_blkgetsize) | ||
3343 | HANDLE_IOCTL(BLKFRAGET, w_long) | ||
3344 | HANDLE_IOCTL(BLKSECTGET, w_long) | ||
3345 | HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans) | 3303 | HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans) |
3346 | HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans) | 3304 | HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans) |
3347 | HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans) | 3305 | HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans) |
@@ -3415,9 +3373,6 @@ HANDLE_IOCTL(SONET_GETFRAMING, do_atm_ioctl) | |||
3415 | HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl) | 3373 | HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl) |
3416 | /* block stuff */ | 3374 | /* block stuff */ |
3417 | #ifdef CONFIG_BLOCK | 3375 | #ifdef CONFIG_BLOCK |
3418 | HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget) | ||
3419 | HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset) | ||
3420 | HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64) | ||
3421 | /* Raw devices */ | 3376 | /* Raw devices */ |
3422 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) | 3377 | HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) |
3423 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) | 3378 | HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) |