[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More JFFS problems...
alex@xxxxxxx.se said:
> yes, something must be seriously busted if you managed to read the
> "xx" from the end of the file.
Actually, there's also a fault in the write code. I was looking at the
wrong field in that hexdump I posted - it's the _length_ of the third node
that's set to 2. The offset is 15.
I've fixed up jffs_read_data() but if I correct the filesystem so the third
node is as it should be, then jffs_scan_flash() fails to put it into the
list:
jffs_delete_data(): offset = 0, remove_size = 0
jffs_insert_data(): node->data_offset = 0, node->data_size = 8, f->size = 0
jffs_insert_data(): f->size = 8
jffs_update_file(): ino: 2, version: 3
jffs_delete_data(): offset = 8, remove_size = 0
jffs_insert_data(): node->data_offset = 8, node->data_size = 7, f->size = 8
jffs_insert_data(): f->size = 15
jffs_update_file(): ino: 2, version: 4
jffs_delete_data(): offset = 2, remove_size = 0
jffs_delete_data(): f->size = 15
jffs_insert_data(): node->data_offset = 2, node->data_size = 2, f->size = 15
Cool stuff's happening!
jffs_insert_data(): Couldn't find a place to insert the data!
I don't think jffs_insert_data should be arranging nodes in order of
increasing data_offset - they should be arranged in order of increasing
version.
--
dwmw2