patch-2.4.27 linux-2.4.27/drivers/isdn/divert/divert_procfs.c

Next file: linux-2.4.27/drivers/isdn/hisax/nj_s.c
Previous file: linux-2.4.27/drivers/ieee1394/video1394.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/isdn/divert/divert_procfs.c linux-2.4.27/drivers/isdn/divert/divert_procfs.c
@@ -80,6 +80,7 @@
 isdn_divert_read(struct file *file, char *buf, size_t count, loff_t * off)
 {
 	struct divert_info *inf;
+	loff_t pos = *off;
 	int len;
 
 	if (!*((struct divert_info **) file->private_data)) {
@@ -95,7 +96,7 @@
 	if ((len = strlen(inf->info_start)) <= count) {
 		if (copy_to_user(buf, inf->info_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)