patch-pre2.0.6 linux/drivers/scsi/sr_ioctl.c
Next file: linux/drivers/scsi/st.c
Previous file: linux/drivers/scsi/sd.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sat May 18 22:19:19 1996
- Orig file:
pre2.0.5/linux/drivers/scsi/sr_ioctl.c
- Orig date:
Sun May 5 08:52:02 1996
diff -u --recursive --new-file pre2.0.5/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
@@ -554,21 +554,30 @@
return (0);
}
+ case BLKRAGET:
+ if (!arg)
+ return -EINVAL;
+ err = verify_area(VERIFY_WRITE, (int *) arg, sizeof(int));
+ if (err)
+ return err;
+ put_user(read_ahead[MAJOR(inode->i_rdev)], (int *) arg);
+ return 0;
+
case BLKRASET:
- {
- if(!suser()) return -EACCES;
- if(!(inode->i_rdev)) return -EINVAL;
- if(arg > 0xff) return -EINVAL;
+ if(!suser())
+ return -EACCES;
+ if(!(inode->i_rdev))
+ return -EINVAL;
+ if(arg > 0xff)
+ return -EINVAL;
read_ahead[MAJOR(inode->i_rdev)] = arg;
return 0;
- RO_IOCTLS(dev,arg);
- }
+
+ RO_IOCTLS(dev,arg);
case CDROMRESET:
- {
- invalidate_buffers(MKDEV(MAJOR(inode->i_rdev),MINOR(inode->i_rdev)));
+ invalidate_buffers(inode->i_rdev);
return 0;
- }
default:
return scsi_ioctl(scsi_CDs[target].device,cmd,(void *) arg);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this