jffs2dump endian convert does not convert major/minor numbers
Norbert Nemeth
nyonhar at gmail.com
Fri Mar 28 05:01:38 EDT 2014
Hi,
Using jffs2dump endian convert feature would leave the major and minor
numbers untouched, so they will be "swapped" in the resulting image.
Looking into mkfs.jffs2.c, major/minor data is written by
write_special_file as a byte each into the data section. There is no
special handling for this in jffs2dump.c / do_endianconvert.
The attached patch is a possible solution for this issue.
One way to reproduce it:
$ ls -l test
total 0
brw-r--r-- 1 root root 1, 2 Mar 28 09:32 myblockdev
crw-r--r-- 1 root root 1, 2 Mar 28 09:32 mychardev
$ mkfs.jffs2 -d test -b -o testfs.big.jffs2
$ jffs2dump -b -e testfs.little.jffs2 testfs.big.jffs2
$ xxd testfs.big.jffs2 | grep 0102
0000080: ecd7 187b 0102 ffff 1985 e001 0000 0031 ...{...........1
0000100: 0102 ffff ....
$ xxd testfs.little.jffs2 | grep 0102
0000080: d848 a9f0 0102 ffff 8519 01e0 3100 0000 .H..........1...
0000100: 0102 ffff
$ xxd testfs.little.jffs2 | grep 0201
$
BR,
N.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jffs2dump.c.patch
Type: text/x-patch
Size: 2089 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20140328/aa10a4d9/attachment.bin>
More information about the linux-mtd
mailing list