diff options
-rw-r--r-- | block/compat_ioctl.c | 14 | ||||
-rw-r--r-- | fs/compat_ioctl.c | 5 | ||||
-rw-r--r-- | include/linux/fd.h | 18 |
3 files changed, 23 insertions, 14 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index cc3eb78e333a..7b725020823c 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c | |||
@@ -208,19 +208,6 @@ static int compat_blkpg_ioctl(struct block_device *bdev, fmode_t mode, | |||
208 | #define BLKBSZSET_32 _IOW(0x12, 113, int) | 208 | #define BLKBSZSET_32 _IOW(0x12, 113, int) |
209 | #define BLKGETSIZE64_32 _IOR(0x12, 114, int) | 209 | #define BLKGETSIZE64_32 _IOR(0x12, 114, int) |
210 | 210 | ||
211 | struct compat_floppy_struct { | ||
212 | compat_uint_t size; | ||
213 | compat_uint_t sect; | ||
214 | compat_uint_t head; | ||
215 | compat_uint_t track; | ||
216 | compat_uint_t stretch; | ||
217 | unsigned char gap; | ||
218 | unsigned char rate; | ||
219 | unsigned char spec1; | ||
220 | unsigned char fmt_gap; | ||
221 | const compat_caddr_t name; | ||
222 | }; | ||
223 | |||
224 | struct compat_floppy_drive_params { | 211 | struct compat_floppy_drive_params { |
225 | char cmos; | 212 | char cmos; |
226 | compat_ulong_t max_dtr; | 213 | compat_ulong_t max_dtr; |
@@ -288,7 +275,6 @@ struct compat_floppy_write_errors { | |||
288 | 275 | ||
289 | #define FDSETPRM32 _IOW(2, 0x42, struct compat_floppy_struct) | 276 | #define FDSETPRM32 _IOW(2, 0x42, struct compat_floppy_struct) |
290 | #define FDDEFPRM32 _IOW(2, 0x43, struct compat_floppy_struct) | 277 | #define FDDEFPRM32 _IOW(2, 0x43, struct compat_floppy_struct) |
291 | #define FDGETPRM32 _IOR(2, 0x04, struct compat_floppy_struct) | ||
292 | #define FDSETDRVPRM32 _IOW(2, 0x90, struct compat_floppy_drive_params) | 278 | #define FDSETDRVPRM32 _IOW(2, 0x90, struct compat_floppy_drive_params) |
293 | #define FDGETDRVPRM32 _IOR(2, 0x11, struct compat_floppy_drive_params) | 279 | #define FDGETDRVPRM32 _IOR(2, 0x11, struct compat_floppy_drive_params) |
294 | #define FDGETDRVSTAT32 _IOR(2, 0x12, struct compat_floppy_drive_struct) | 280 | #define FDGETDRVSTAT32 _IOR(2, 0x12, struct compat_floppy_drive_struct) |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 61abb638b4bf..8be086e9abe4 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -68,6 +68,8 @@ | |||
68 | 68 | ||
69 | #ifdef CONFIG_BLOCK | 69 | #ifdef CONFIG_BLOCK |
70 | #include <linux/loop.h> | 70 | #include <linux/loop.h> |
71 | #include <linux/cdrom.h> | ||
72 | #include <linux/fd.h> | ||
71 | #include <scsi/scsi.h> | 73 | #include <scsi/scsi.h> |
72 | #include <scsi/scsi_ioctl.h> | 74 | #include <scsi/scsi_ioctl.h> |
73 | #include <scsi/sg.h> | 75 | #include <scsi/sg.h> |
@@ -944,6 +946,9 @@ COMPATIBLE_IOCTL(FIOQSIZE) | |||
944 | IGNORE_IOCTL(LOOP_CLR_FD) | 946 | IGNORE_IOCTL(LOOP_CLR_FD) |
945 | /* md calls this on random blockdevs */ | 947 | /* md calls this on random blockdevs */ |
946 | IGNORE_IOCTL(RAID_VERSION) | 948 | IGNORE_IOCTL(RAID_VERSION) |
949 | /* qemu/qemu-img might call these two on plain files for probing */ | ||
950 | IGNORE_IOCTL(CDROM_DRIVE_STATUS) | ||
951 | IGNORE_IOCTL(FDGETPRM32) | ||
947 | /* SG stuff */ | 952 | /* SG stuff */ |
948 | COMPATIBLE_IOCTL(SG_SET_TIMEOUT) | 953 | COMPATIBLE_IOCTL(SG_SET_TIMEOUT) |
949 | COMPATIBLE_IOCTL(SG_GET_TIMEOUT) | 954 | COMPATIBLE_IOCTL(SG_GET_TIMEOUT) |
diff --git a/include/linux/fd.h b/include/linux/fd.h index f5d194af07a8..c6a68d011608 100644 --- a/include/linux/fd.h +++ b/include/linux/fd.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/ioctl.h> | 4 | #include <linux/ioctl.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | #include <linux/compat.h> | ||
6 | 7 | ||
7 | /* New file layout: Now the ioctl definitions immediately follow the | 8 | /* New file layout: Now the ioctl definitions immediately follow the |
8 | * definitions of the structures that they use */ | 9 | * definitions of the structures that they use */ |
@@ -377,4 +378,21 @@ struct floppy_raw_cmd { | |||
377 | #define FDEJECT _IO(2, 0x5a) | 378 | #define FDEJECT _IO(2, 0x5a) |
378 | /* eject the disk */ | 379 | /* eject the disk */ |
379 | 380 | ||
381 | #ifdef CONFIG_COMPAT | ||
382 | struct compat_floppy_struct { | ||
383 | compat_uint_t size; | ||
384 | compat_uint_t sect; | ||
385 | compat_uint_t head; | ||
386 | compat_uint_t track; | ||
387 | compat_uint_t stretch; | ||
388 | unsigned char gap; | ||
389 | unsigned char rate; | ||
390 | unsigned char spec1; | ||
391 | unsigned char fmt_gap; | ||
392 | const compat_caddr_t name; | ||
393 | }; | ||
394 | |||
395 | #define FDGETPRM32 _IOR(2, 0x04, struct compat_floppy_struct) | ||
396 | #endif | ||
397 | |||
380 | #endif | 398 | #endif |