patch-2.3.3 linux/drivers/block/ataflop.c
Next file: linux/drivers/block/blkpg.c
Previous file: linux/drivers/block/acsi.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Sat May 15 23:43:04 1999
- Orig file:
v2.3.2/linux/drivers/block/ataflop.c
- Orig date:
Fri May 14 18:55:13 1999
diff -u --recursive --new-file v2.3.2/linux/drivers/block/ataflop.c linux/drivers/block/ataflop.c
@@ -93,6 +93,7 @@
#define MAJOR_NR FLOPPY_MAJOR
#include <linux/blk.h>
+#include <linux/blkpg.h>
#define FD_MAX_UNITS 2
@@ -1584,7 +1585,12 @@
device = inode->i_rdev;
switch (cmd) {
- RO_IOCTLS (device, param);
+ case BLKROSET:
+ case BLKROGET:
+ case BLKRASET:
+ case BLKRAGET:
+ case BLKFLSBUF:
+ return blk_ioctl(device, cmd, param);
}
drive = MINOR (device);
type = drive >> 2;
@@ -1620,22 +1626,6 @@
getprm.stretch = dtp->stretch;
if (copy_to_user((void *)param, &getprm, sizeof(getprm)))
return -EFAULT;
- return 0;
- case BLKRASET:
- if (!capable(CAP_SYS_ADMIN))
- return -EACCES;
- if (param > 0xff)
- return -EINVAL;
- read_ahead[MAJOR(inode->i_rdev)] = param;
- return 0;
- case BLKRAGET:
- return put_user(read_ahead[MAJOR(inode->i_rdev)],
- (int *) param);
- case BLKFLSBUF:
- if (!capable(CAP_SYS_ADMIN))
- return -EACCES;
- fsync_dev(inode->i_rdev);
- invalidate_buffers(inode->i_rdev);
return 0;
}
if (!IOCTL_ALLOWED)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)