idetape_tape_t *tape = drive->driver_data;
ssize_t bytes_read,temp, actually_read = 0, rc;
- if (ppos != &file->f_pos) {
- /* "A request was outside the capabilities of the device." */
- return -ENXIO;
- }
#if IDETAPE_DEBUG_LOG
if (tape->debug_level >= 3)
printk(KERN_INFO "ide-tape: Reached idetape_chrdev_read, count %Zd\n", count);
idetape_tape_t *tape = drive->driver_data;
ssize_t retval, actually_written = 0;
- if (ppos != &file->f_pos) {
- /* "A request was outside the capabilities of the device." */
- return -ENXIO;
- }
-
/* The drive is write protected. */
if (tape->write_prot)
return -EACCES;
idetape_pc_t pc;
int retval;
+ nonseekable_open(inode, filp);
#if IDETAPE_DEBUG_LOG
printk(KERN_INFO "ide-tape: Reached idetape_chrdev_open\n");
#endif /* IDETAPE_DEBUG_LOG */
int dev = TAPE_NR(inode);
char *name;
+ nonseekable_open(inode, filp);
write_lock(&st_dev_arr_lock);
if (dev >= st_dev_max || scsi_tapes == NULL ||
((STp = scsi_tapes[dev]) == NULL)) {
}
\f
/* The checks common to both reading and writing */
-static ssize_t rw_checks(Scsi_Tape *STp, struct file *filp, size_t count, loff_t *ppos)
+static ssize_t rw_checks(Scsi_Tape *STp, struct file *filp, size_t count)
{
ssize_t retval = 0;
goto out;
}
- if (ppos != &filp->f_pos) {
- /* "A request was outside the capabilities of the device." */
- retval = (-ENXIO);
- goto out;
- }
-
if (STp->ready != ST_READY) {
if (STp->ready == ST_NO_TAPE)
retval = (-ENOMEDIUM);
if (down_interruptible(&STp->lock))
return -ERESTARTSYS;
- retval = rw_checks(STp, filp, count, ppos);
+ retval = rw_checks(STp, filp, count);
if (retval || count == 0)
goto out;
if (down_interruptible(&STp->lock))
return -ERESTARTSYS;
- retval = rw_checks(STp, filp, count, ppos);
+ retval = rw_checks(STp, filp, count);
if (retval || count == 0)
goto out;