sprintf(&buf[ i * 16], "%02x%c%4x%4x%4x\n", i + fb_info->cmap.start, 
snprintf(&buf[ i * 16], PAGE_SIZE - i * 16, "%02x%c%4x%4x%4x\n", i + fb_info->cmap.start, 
static ssize_t show_cmap(struct class_device *class_device, char *buf){	struct fb_info *fb_info =		(struct fb_info *)class_get_devdata(class_device);	unsigned int i;	if (!fb_info->cmap.red || !fb_info->cmap.blue ||	   !fb_info->cmap.green)		return -EINVAL;	if (PAGE_SIZE < 4096)		return -EINVAL;	/* don't mess with the format, the buffer is PAGE_SIZE */	/* 255 entries at 16 chars per line equals 4096 = PAGE_SIZE */	for (i = 0; i < fb_info->cmap.len; i++) {		sprintf(&buf[ i * 16], "%02x%c%4x%4x%4x\n", i + fb_info->cmap.start,			((fb_info->cmap.transp && fb_info->cmap.transp[i]) ? '*' : ' '),			fb_info->cmap.red[i], fb_info->cmap.blue[i],			fb_info->cmap.green[i]);	}	return 4096;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f0b9d796002d9d39575cf1beabfb625f68b507fa/fbsysfs.c/buggy/drivers/video/fbsysfs.c