patch-2.3.49 linux/drivers/video/fbmem.c
Next file: linux/drivers/video/matrox/matroxfb_base.c
Previous file: linux/drivers/video/cyber2000fb.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Tue Feb 29 11:55:01 2000
- Orig file:
v2.3.48/linux/drivers/video/fbmem.c
- Orig date:
Wed Feb 16 17:03:52 2000
diff -u --recursive --new-file v2.3.48/linux/drivers/video/fbmem.c linux/drivers/video/fbmem.c
@@ -247,15 +247,20 @@
int len, int *eof, void *private)
{
struct fb_info **fi;
+ int clen;
- len = 0;
+ clen = 0;
for (fi = registered_fb; fi < ®istered_fb[FB_MAX] && len < 4000; fi++)
if (*fi)
- len += sprintf(buf + len, "%d %s\n",
- GET_FB_IDX((*fi)->node),
- (*fi)->modename);
+ clen += sprintf(buf + clen, "%d %s\n",
+ GET_FB_IDX((*fi)->node),
+ (*fi)->modename);
*start = buf + offset;
- return len > offset ? len - offset : 0;
+ if (clen > offset)
+ clen -= offset;
+ else
+ clen = 0;
+ return clen < len ? clen : len;
}
static ssize_t
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)