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
- Lines: 17
- Date:
2004-08-07 16:26:04.858355160 -0700
- Orig file:
linux-2.4.26/drivers/isdn/divert/divert_procfs.c
- Orig date:
2001-12-21 09:41:54.000000000 -0800
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)