X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fftape%2Fzftape%2Fzftape-init.c;h=eefd94a6d04c8cb92dd20223c3a03de34b9c5a1a;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=1fc5feaf99226286282b7c485f8520920cabc31c;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c index 1fc5feaf9..eefd94a6d 100644 --- a/drivers/char/ftape/zftape/zftape-init.c +++ b/drivers/char/ftape/zftape/zftape-init.c @@ -88,9 +88,9 @@ static int zft_close(struct inode *ino, struct file *filep); static int zft_ioctl(struct inode *ino, struct file *filep, unsigned int command, unsigned long arg); static int zft_mmap(struct file *filep, struct vm_area_struct *vma); -static ssize_t zft_read (struct file *fp, char *buff, +static ssize_t zft_read (struct file *fp, char __user *buff, size_t req_len, loff_t *ppos); -static ssize_t zft_write(struct file *fp, const char *buff, +static ssize_t zft_write(struct file *fp, const char __user *buff, size_t req_len, loff_t *ppos); static struct file_operations zft_cdev = @@ -113,6 +113,7 @@ static int zft_open(struct inode *ino, struct file *filep) int result; TRACE_FUN(ft_t_flow); + nonseekable_open(ino, filep); TRACE(ft_t_flow, "called for minor %d", iminor(ino)); if ( test_and_set_bit(0,&busy_flag) ) { TRACE_ABORT(-EBUSY, ft_t_warn, "failed: already busy"); @@ -177,7 +178,7 @@ static int zft_ioctl(struct inode *ino, struct file *filep, old_sigmask = current->blocked; /* save mask */ sigfillset(¤t->blocked); /* This will work as long as sizeof(void *) == sizeof(long) */ - result = _zft_ioctl(command, (void *) arg); + result = _zft_ioctl(command, (void __user *) arg); current->blocked = old_sigmask; /* restore mask */ TRACE_EXIT result; } @@ -211,7 +212,7 @@ static int zft_mmap(struct file *filep, struct vm_area_struct *vma) /* Read from floppy tape device */ -static ssize_t zft_read(struct file *fp, char *buff, +static ssize_t zft_read(struct file *fp, char __user *buff, size_t req_len, loff_t *ppos) { int result = -EIO; @@ -234,7 +235,7 @@ static ssize_t zft_read(struct file *fp, char *buff, /* Write to tape device */ -static ssize_t zft_write(struct file *fp, const char *buff, +static ssize_t zft_write(struct file *fp, const char __user *buff, size_t req_len, loff_t *ppos) { int result = -EIO;