patch-2.4.27 linux-2.4.27/drivers/isdn/hysdn/hysdn_proclog.c

Next file: linux-2.4.27/drivers/isdn/isdn_common.c
Previous file: linux-2.4.27/drivers/isdn/hysdn/hysdn_procconf.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/isdn/hysdn/hysdn_proclog.c linux-2.4.27/drivers/isdn/hysdn/hysdn_proclog.c
@@ -210,6 +210,7 @@
 	word ino;
 	struct procdata *pd = NULL;
 	hysdn_card *card;
+	loff_t pos = *off;
 
 	if (!*((struct log_data **) file->private_data)) {
 		if (file->f_flags & O_NONBLOCK)
@@ -238,7 +239,7 @@
 	if ((len = strlen(inf->log_start)) <= count) {
 		if (copy_to_user(buf, inf->log_start, len))
 			return -EFAULT;
-		file->f_pos += len;
+		*off = pos + len;
 		return (len);
 	}
 	return (0);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)