aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2007-10-09 07:23:56 -0400
committerJens Axboe <axboe@carl.home.kernel.dk>2007-10-10 03:26:00 -0400
commit18cf7f8723d913ce02bea43e468bebdd07bc880c (patch)
treea76588ab76db68fcb289babb1770e2fe13a6bd42 /fs
parent9617db085c119879cd371e3212806a15596e121a (diff)
compat_ioctl: move BLKPG handling to block/compat_ioctl.c
BLKPG is common to all block devices, so it should be handled by common code. 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.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index e6a94714b1b0..3baa90d31090 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -47,7 +47,6 @@
47#include <linux/netdevice.h> 47#include <linux/netdevice.h>
48#include <linux/raw.h> 48#include <linux/raw.h>
49#include <linux/smb_fs.h> 49#include <linux/smb_fs.h>
50#include <linux/blkpg.h>
51#include <linux/blkdev.h> 50#include <linux/blkdev.h>
52#include <linux/elevator.h> 51#include <linux/elevator.h>
53#include <linux/rtc.h> 52#include <linux/rtc.h>
@@ -1487,37 +1486,6 @@ ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg)
1487 return -EINVAL; 1486 return -EINVAL;
1488} 1487}
1489 1488
1490#ifdef CONFIG_BLOCK
1491struct blkpg_ioctl_arg32 {
1492 compat_int_t op;
1493 compat_int_t flags;
1494 compat_int_t datalen;
1495 compat_caddr_t data;
1496};
1497
1498static int blkpg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
1499{
1500 struct blkpg_ioctl_arg32 __user *ua32 = compat_ptr(arg);
1501 struct blkpg_ioctl_arg __user *a = compat_alloc_user_space(sizeof(*a));
1502 compat_caddr_t udata;
1503 compat_int_t n;
1504 int err;
1505
1506 err = get_user(n, &ua32->op);
1507 err |= put_user(n, &a->op);
1508 err |= get_user(n, &ua32->flags);
1509 err |= put_user(n, &a->flags);
1510 err |= get_user(n, &ua32->datalen);
1511 err |= put_user(n, &a->datalen);
1512 err |= get_user(udata, &ua32->data);
1513 err |= put_user(compat_ptr(udata), &a->data);
1514 if (err)
1515 return err;
1516
1517 return sys_ioctl(fd, cmd, (unsigned long)a);
1518}
1519#endif
1520
1521static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg) 1489static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg)
1522{ 1490{
1523 return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg); 1491 return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg);
@@ -3160,7 +3128,6 @@ HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp)
3160HANDLE_IOCTL(SIOCGSTAMPNS, do_siocgstampns) 3128HANDLE_IOCTL(SIOCGSTAMPNS, do_siocgstampns)
3161#endif 3129#endif
3162#ifdef CONFIG_BLOCK 3130#ifdef CONFIG_BLOCK
3163HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans)
3164HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans) 3131HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans)
3165HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans) 3132HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans)
3166HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans) 3133HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans)