patch-1.3.70 linux/drivers/scsi/sd_ioctl.c
Next file: linux/drivers/scsi/seagate.c
Previous file: linux/drivers/scsi/scsi.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Wed Feb 28 15:48:17 1996
- Orig file:
v1.3.69/linux/drivers/scsi/sd_ioctl.c
- Orig date:
Sat Nov 11 17:41:33 1995
diff -u --recursive --new-file v1.3.69/linux/drivers/scsi/sd_ioctl.c linux/drivers/scsi/sd_ioctl.c
@@ -54,12 +54,24 @@
put_user(sd[MINOR(inode->i_rdev)].nr_sects,
(long *) arg);
return 0;
+
case BLKRASET:
- if(!suser()) return -EACCES;
+ if (!suser())
+ return -EACCES;
if(!(inode->i_rdev)) return -EINVAL;
if(arg > 0xff) return -EINVAL;
read_ahead[MAJOR(inode->i_rdev)] = arg;
return 0;
+
+ case BLKRAGET:
+ if (!arg)
+ return -EINVAL;
+ error = verify_area(VERIFY_WRITE, (int *) arg, sizeof(int));
+ if (error)
+ return error;
+ put_user(read_ahead[MAJOR(inode->i_rdev)], (int *) arg);
+ return 0;
+
case BLKFLSBUF:
if(!suser()) return -EACCES;
if(!(inode->i_rdev)) return -EINVAL;
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this