diff options
Diffstat (limited to 'fs/compat_ioctl.c')
| -rw-r--r-- | fs/compat_ioctl.c | 48 |
1 files changed, 9 insertions, 39 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 641640dc7ae5..70227e0dc01d 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) | 4 | * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) |
| 5 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) | 5 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
| 6 | * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs | 6 | * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs |
| 7 | * Copyright (C) 2003 Pavel Machek (pavel@suse.cz) | 7 | * Copyright (C) 2003 Pavel Machek (pavel@ucw.cz) |
| 8 | * | 8 | * |
| 9 | * These routines maintain argument size conversion between 32bit and 64bit | 9 | * These routines maintain argument size conversion between 32bit and 64bit |
| 10 | * ioctls. | 10 | * ioctls. |
| @@ -131,23 +131,6 @@ static int w_long(unsigned int fd, unsigned int cmd, | |||
| 131 | return err; | 131 | return err; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | static int rw_long(unsigned int fd, unsigned int cmd, | ||
| 135 | compat_ulong_t __user *argp) | ||
| 136 | { | ||
| 137 | mm_segment_t old_fs = get_fs(); | ||
| 138 | int err; | ||
| 139 | unsigned long val; | ||
| 140 | |||
| 141 | if(get_user(val, argp)) | ||
| 142 | return -EFAULT; | ||
| 143 | set_fs (KERNEL_DS); | ||
| 144 | err = sys_ioctl(fd, cmd, (unsigned long)&val); | ||
| 145 | set_fs (old_fs); | ||
| 146 | if (!err && put_user(val, argp)) | ||
| 147 | return -EFAULT; | ||
| 148 | return err; | ||
| 149 | } | ||
| 150 | |||
| 151 | struct compat_video_event { | 134 | struct compat_video_event { |
| 152 | int32_t type; | 135 | int32_t type; |
| 153 | compat_time_t timestamp; | 136 | compat_time_t timestamp; |
| @@ -594,15 +577,12 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, | |||
| 594 | return err; | 577 | return err; |
| 595 | } | 578 | } |
| 596 | 579 | ||
| 597 | static int ioc_settimeout(unsigned int fd, unsigned int cmd, | ||
| 598 | compat_ulong_t __user *argp) | ||
| 599 | { | ||
| 600 | return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, argp); | ||
| 601 | } | ||
| 602 | |||
| 603 | /* Bluetooth ioctls */ | 580 | /* Bluetooth ioctls */ |
| 604 | #define HCIUARTSETPROTO _IOW('U', 200, int) | 581 | #define HCIUARTSETPROTO _IOW('U', 200, int) |
| 605 | #define HCIUARTGETPROTO _IOR('U', 201, int) | 582 | #define HCIUARTGETPROTO _IOR('U', 201, int) |
| 583 | #define HCIUARTGETDEVICE _IOR('U', 202, int) | ||
| 584 | #define HCIUARTSETFLAGS _IOW('U', 203, int) | ||
| 585 | #define HCIUARTGETFLAGS _IOR('U', 204, int) | ||
| 606 | 586 | ||
| 607 | #define BNEPCONNADD _IOW('B', 200, int) | 587 | #define BNEPCONNADD _IOW('B', 200, int) |
| 608 | #define BNEPCONNDEL _IOW('B', 201, int) | 588 | #define BNEPCONNDEL _IOW('B', 201, int) |
| @@ -966,6 +946,7 @@ COMPATIBLE_IOCTL(TIOCGPGRP) | |||
| 966 | COMPATIBLE_IOCTL(TIOCGPTN) | 946 | COMPATIBLE_IOCTL(TIOCGPTN) |
| 967 | COMPATIBLE_IOCTL(TIOCSPTLCK) | 947 | COMPATIBLE_IOCTL(TIOCSPTLCK) |
| 968 | COMPATIBLE_IOCTL(TIOCSERGETLSR) | 948 | COMPATIBLE_IOCTL(TIOCSERGETLSR) |
| 949 | COMPATIBLE_IOCTL(TIOCSIG) | ||
| 969 | #ifdef TCGETS2 | 950 | #ifdef TCGETS2 |
| 970 | COMPATIBLE_IOCTL(TCGETS2) | 951 | COMPATIBLE_IOCTL(TCGETS2) |
| 971 | COMPATIBLE_IOCTL(TCSETS2) | 952 | COMPATIBLE_IOCTL(TCSETS2) |
| @@ -1281,13 +1262,6 @@ COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5) | |||
| 1281 | COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS) | 1262 | COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS) |
| 1282 | COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS) | 1263 | COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS) |
| 1283 | COMPATIBLE_IOCTL(OSS_GETVERSION) | 1264 | COMPATIBLE_IOCTL(OSS_GETVERSION) |
| 1284 | /* AUTOFS */ | ||
| 1285 | COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC) | ||
| 1286 | COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER) | ||
| 1287 | COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE) | ||
| 1288 | COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI) | ||
| 1289 | COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER) | ||
| 1290 | COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) | ||
| 1291 | /* Raw devices */ | 1265 | /* Raw devices */ |
| 1292 | COMPATIBLE_IOCTL(RAW_SETBIND) | 1266 | COMPATIBLE_IOCTL(RAW_SETBIND) |
| 1293 | COMPATIBLE_IOCTL(RAW_GETBIND) | 1267 | COMPATIBLE_IOCTL(RAW_GETBIND) |
| @@ -1328,6 +1302,8 @@ COMPATIBLE_IOCTL(HCISETLINKPOL) | |||
| 1328 | COMPATIBLE_IOCTL(HCISETLINKMODE) | 1302 | COMPATIBLE_IOCTL(HCISETLINKMODE) |
| 1329 | COMPATIBLE_IOCTL(HCISETACLMTU) | 1303 | COMPATIBLE_IOCTL(HCISETACLMTU) |
| 1330 | COMPATIBLE_IOCTL(HCISETSCOMTU) | 1304 | COMPATIBLE_IOCTL(HCISETSCOMTU) |
| 1305 | COMPATIBLE_IOCTL(HCIBLOCKADDR) | ||
| 1306 | COMPATIBLE_IOCTL(HCIUNBLOCKADDR) | ||
| 1331 | COMPATIBLE_IOCTL(HCIINQUIRY) | 1307 | COMPATIBLE_IOCTL(HCIINQUIRY) |
| 1332 | COMPATIBLE_IOCTL(HCIUARTSETPROTO) | 1308 | COMPATIBLE_IOCTL(HCIUARTSETPROTO) |
| 1333 | COMPATIBLE_IOCTL(HCIUARTGETPROTO) | 1309 | COMPATIBLE_IOCTL(HCIUARTGETPROTO) |
| @@ -1552,9 +1528,6 @@ static long do_ioctl_trans(int fd, unsigned int cmd, | |||
| 1552 | case RAW_GETBIND: | 1528 | case RAW_GETBIND: |
| 1553 | return raw_ioctl(fd, cmd, argp); | 1529 | return raw_ioctl(fd, cmd, argp); |
| 1554 | #endif | 1530 | #endif |
| 1555 | #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int) | ||
| 1556 | case AUTOFS_IOC_SETTIMEOUT32: | ||
| 1557 | return ioc_settimeout(fd, cmd, argp); | ||
| 1558 | /* One SMB ioctl needs translations. */ | 1531 | /* One SMB ioctl needs translations. */ |
| 1559 | #define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t) | 1532 | #define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t) |
| 1560 | case SMB_IOC_GETMOUNTUID_32: | 1533 | case SMB_IOC_GETMOUNTUID_32: |
| @@ -1609,9 +1582,6 @@ static long do_ioctl_trans(int fd, unsigned int cmd, | |||
| 1609 | case KDSKBMETA: | 1582 | case KDSKBMETA: |
| 1610 | case KDSKBLED: | 1583 | case KDSKBLED: |
| 1611 | case KDSETLED: | 1584 | case KDSETLED: |
| 1612 | /* AUTOFS */ | ||
| 1613 | case AUTOFS_IOC_READY: | ||
| 1614 | case AUTOFS_IOC_FAIL: | ||
| 1615 | /* NBD */ | 1585 | /* NBD */ |
| 1616 | case NBD_SET_SOCK: | 1586 | case NBD_SET_SOCK: |
| 1617 | case NBD_SET_BLKSIZE: | 1587 | case NBD_SET_BLKSIZE: |
