patch-2.3.3 linux/drivers/block/floppy.c
Next file: linux/drivers/block/genhd.c
Previous file: linux/drivers/block/cmd646.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Sat May 15 23:43:04 1999
- Orig file:
v2.3.2/linux/drivers/block/floppy.c
- Orig date:
Fri May 14 18:55:13 1999
diff -u --recursive --new-file v2.3.2/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
@@ -198,6 +198,7 @@
#define MAJOR_NR FLOPPY_MAJOR
#include <linux/blk.h>
+#include <linux/blkpg.h>
#include <linux/cdrom.h> /* for the compatibility eject ioctl */
#ifndef fd_get_dma_residue
@@ -3293,7 +3294,7 @@
LOCK_FDC(drive,1);
if (cmd != FDDEFPRM)
/* notice a disk change immediately, else
- * we loose our settings immediately*/
+ * we lose our settings immediately*/
CALL(poll_drive(1, FD_RAW_NEED_DISK));
user_params[drive] = *g;
if (buffer_drive == drive)
@@ -3402,7 +3403,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);
}
type = TYPE(device);
drive = DRIVE(device);
@@ -3432,19 +3438,6 @@
loc.start = 0;
return _COPYOUT(loc);
}
- 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)],
- (long *) param);
- case BLKFLSBUF:
- if(!capable(CAP_SYS_ADMIN)) return -EACCES;
- fsync_dev(inode->i_rdev);
- invalidate_buffers(inode->i_rdev);
- return 0;
case BLKGETSIZE:
ECALL(get_floppy_geometry(drive, type, &g));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)