patch-2.4.0-test7 linux/drivers/pci/proc.c
Next file: linux/drivers/pci/setup-res.c
Previous file: linux/drivers/pci/pci.ids
Back to the patch index
Back to the overall index
- Lines: 14
- Date:
Mon Aug 21 09:07:15 2000
- Orig file:
v2.4.0-test6/linux/drivers/pci/proc.c
- Orig date:
Thu May 11 15:30:07 2000
diff -u --recursive --new-file v2.4.0-test6/linux/drivers/pci/proc.c linux/drivers/pci/proc.c
@@ -238,6 +238,13 @@
} else
cnt += len;
buf += len;
+ if (cnt >= count)
+ /*
+ * proc_file_read() gives us 1KB of slack so it's OK if the
+ * above printfs write a little beyond the buffer end (we
+ * never write more than 1KB beyond the buffer end).
+ */
+ break;
}
}
return (count > cnt) ? cnt : count;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)