[PATCH 2/4] util/jffs2reader file size fix

Suzuki Takashi suzuki.takashi at gmail.com
Fri Oct 14 23:12:07 EDT 2005


This is a trivial patch for util/jffs2reader
to correct file sizes shown in the listings.

Please review and apply if it is ok.
Thanks.


[PATCH 2/4] util/jffs2reader print file size fix

jffs2reader outputs wrong size for a file larger than a block size.
It outputs dsize of the newest raw inode as the file size.
This patch corrects it to use isize instead.

This patch depends on:
[PATCH 1/4] util/jffs2reader compile fix

Signed-off-by: Suzuki Takashi <suzuki.takashi at gmail.com>


--- jffs2reader.c.compile	2005-10-10 12:51:37.000000000 +0900
+++ jffs2reader.c	2005-10-10 17:55:17.000000000 +0900
@@ -369,7 +369,7 @@ void printdir(char *o, size_t size, stru
 			putblock((char*)&rdev, sizeof(rdev), &devsize, ri);
 			printf("%4d, %3d ", (int)MAJOR(rdev), (int)MINOR(rdev));
 		} else {
-			printf("%9ld ", (long)je32_to_cpu (ri->dsize));
+			printf("%9ld ", (long)je32_to_cpu (ri->isize));
 		}
 		d->name[d->nsize]='\0';
 		if (age < 3600L * 24 * 365 / 2 && age > -15 * 60) {

--
Suzuki Takashi




More information about the linux-mtd mailing list