X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fisdn%2Fhysdn%2Fhysdn_procconf.c;h=2a312dee7743fdbc1e73e370a3e50a5af31aa024;hb=40b5a8819a087d0a4ad418754432e71c49f98ae2;hp=5da507e532fc5ef9bbac164516f89d8f081e4d8e;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 5da507e53..2a312dee7 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c @@ -89,12 +89,14 @@ process_line(struct conf_writedata *cnf) /* write conf file -> boot or send cfg line to card */ /****************************************************/ static ssize_t -hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t * off) +hysdn_conf_write(struct file *file, const char *buf, size_t count, loff_t * off) { struct conf_writedata *cnf; int i; uchar ch, *cp; + if (&file->f_pos != off) /* fs error check */ + return (-ESPIPE); if (!count) return (0); /* nothing to handle */ @@ -207,11 +209,14 @@ hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t /* read conf file -> output card info data */ /*******************************************/ static ssize_t -hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off) +hysdn_conf_read(struct file *file, char *buf, size_t count, loff_t * off) { char *cp; int i; + if (off != &file->f_pos) /* fs error check */ + return -ESPIPE; + if (file->f_mode & FMODE_READ) { if (!(cp = file->private_data)) return (-EFAULT); /* should never happen */ @@ -315,7 +320,7 @@ hysdn_conf_open(struct inode *ino, struct file *filep) return (-EPERM); /* no permission this time */ } unlock_kernel(); - return nonseekable_open(ino, filep); + return (0); } /* hysdn_conf_open */ /***************************/