This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / isdn / hysdn / hysdn_proclog.c
index 8ef2b7c..4211cd0 100644 (file)
@@ -150,7 +150,7 @@ put_log_buffer(hysdn_card * card, char *cp)
 /* write log file -> set log level bits */
 /****************************************/
 static ssize_t
-hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
+hysdn_log_write(struct file *file, const char *buf, size_t count, loff_t * off)
 {
        ulong u = 0;
        int found = 0;
@@ -158,6 +158,9 @@ hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t
        long base = 10;
        hysdn_card *card = (hysdn_card *) file->private_data;
 
+       if (&file->f_pos != off)        /* fs error check */
+               return (-ESPIPE);
+
        if (count > (sizeof(valbuf) - 1))
                count = sizeof(valbuf) - 1;     /* limit length */
        if (copy_from_user(valbuf, buf, count))
@@ -200,7 +203,7 @@ hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t
 /* read log file */
 /******************/
 static ssize_t
-hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t * off)
+hysdn_log_read(struct file *file, char *buf, size_t count, loff_t * off)
 {
        struct log_data *inf;
        int len;
@@ -234,7 +237,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t * off)
        if ((len = strlen(inf->log_start)) <= count) {
                if (copy_to_user(buf, inf->log_start, len))
                        return -EFAULT;
-               *off += len;
+               file->f_pos += len;
                return (len);
        }
        return (0);
@@ -282,7 +285,7 @@ hysdn_log_open(struct inode *ino, struct file *filep)
                return (-EPERM);        /* no permission this time */
        }
        unlock_kernel();
-       return nonseekable_open(ino, filep);
+       return (0);
 }                              /* hysdn_log_open */
 
 /*******************************************************************************/