mtd/fs/jffs2 scan.c,1.129,1.130

tpoynor at infradead.org tpoynor at infradead.org
Sat Nov 12 14:42:13 EST 2005


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv18327/fs/jffs2

Modified Files:
	scan.c 
Log Message:
[JFFS2] Fix compile error for CONFIG_JFFS2_FS_DEBUG=2

void * parameter was dereferenced in debugging printk that apparently wants
to print 8-bit bytes.

Signed-off-by: Todd Poynor <tpoynor at mvista.com>


Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- scan.c	11 Nov 2005 14:29:12 -0000	1.129
+++ scan.c	12 Nov 2005 19:42:09 -0000	1.130
@@ -274,11 +274,12 @@
 int jffs2_fill_scan_buf (struct jffs2_sb_info *c, void *buf,
 				uint32_t ofs, uint32_t len)
 {
+	D2(char *cbuf = buf);
 	if (jffs2_flash_read_safe(c, ofs, len, buf))
 		return -EIO;
 	D2(printk(KERN_DEBUG "Read 0x%x bytes from 0x%08x into buf\n", len, ofs));
 	D2(printk(KERN_DEBUG "000: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
-		  buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], buf[8], buf[9], buf[10], buf[11], buf[12], buf[13], buf[14], buf[15]));
+		  cbuf[0], cbuf[1], cbuf[2], cbuf[3], cbuf[4], cbuf[5], cbuf[6], cbuf[7], cbuf[8], cbuf[9], cbuf[10], cbuf[11], cbuf[12], cbuf[13], cbuf[14], cbuf[15]));
 	return 0;
 }
 





More information about the linux-mtd-cvs mailing list