patch-2.1.30 linux/drivers/char/misc.c

Next file: linux/drivers/char/random.c
Previous file: linux/drivers/char/keyboard.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.29/linux/drivers/char/misc.c linux/drivers/char/misc.c
@@ -80,9 +80,10 @@
 	struct miscdevice *p;
 
 	len=0;
-	for (p = misc_list.next; p != &misc_list; p = p->next)
+	for (p = misc_list.next; p != &misc_list && len < 4000; p = p->next)
 		len += sprintf(buf+len, "%3i %s\n",p->minor, p->name ?: "");
-	return len;
+	*start = buf + offset;
+	return len > offset ? len - offset : 0;
 }
 
 #endif /* PROC_FS */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov