u-boot/fs/ubifs
Veli-Pekka Peltola 8044c1387f ubifs: Fix ubifsload when using ZLIB
Using ZLIB compression with UBIFS fails if last data node is not a size of
UBIFS_BLOCK_SIZE (4096 bytes).

Easiest way to test this is trying to read a file smaller than 4k:
=> ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
UBIFS error (pid 0): read_block: bad data node (block 0, inode 2506)
UBIFS error (pid 0): do_readpage: cannot read page 0 of inode 2506, error -22
Error reading file '/etc/fstab'
/etc/fstab not found!
exit not allowed from main input shell.
=>

With this patch:

=> ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
Done
=>

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Cc: kmpark@infradead.org
Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2012-09-10 11:37:42 +02:00
..
budget.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
crc16.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
crc16.h Update CHANGELOG, coding style cleanup. 2009-04-05 00:27:57 +02:00
debug.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
debug.h UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
io.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
key.h UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
log.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
lprops.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
lpt.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
lpt_commit.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
Makefile Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
master.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
misc.h UBIFS: Fix dereferencing type-punned pointer compiler warning 2011-01-11 11:09:36 +01:00
orphan.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
recovery.c UBIFS: fix recovery bug 2009-04-28 00:36:21 +02:00
replay.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
sb.c UBIFS: add R/O compatibility 2009-04-04 22:44:22 +02:00
scan.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
super.c UBIFS: Improve error message when reading superblock failed 2012-08-09 22:12:16 +02:00
tnc.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
tnc_misc.c UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
ubifs-media.h UBIFS: add R/O compatibility 2009-04-04 22:44:22 +02:00
ubifs.c ubifs: Fix ubifsload when using ZLIB 2012-09-10 11:37:42 +02:00
ubifs.h move prototypes for gunzip() and zunzip() to common.h 2009-12-21 21:39:59 +01:00