u-boot-brain/fs
Joao Marcos Costa 0008d80866 fs/squashfs: fix reading of fragmented files
The fragmented files were not correctly read because of two issues:

- The squashfs_file_info struct has a field named 'comp', which tells if
the file's fragment is compressed or not. This field was always set to
'true' in sqfs_get_regfile_info and sqfs_get_lregfile_info. It should
actually take sqfs_frag_lookup's return value. This patch addresses
these two assignments.

- In sqfs_read, the fragments (compressed or not) were copied to the
output buffer through a for loop which was reading data at the wrong
offset. Replace these loops by equivalent calls to memcpy, with the
right parameters.

I tested this patch by comparing the MD5 checksum of a few fragmented
files with the respective md5sum output in sandbox, considering both
compressed and uncompressed fragments.

Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
Tested-by: Richard Genoud <richard.genoud@posteo.net>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2021-06-09 20:58:20 -04:00
..
btrfs fs: btrfs: Add missing cache aligned allocation 2021-05-26 17:26:07 -04:00
cbfs cbfs: Drop unnecessary cast in file_cbfs_fill_cache() 2021-03-27 13:59:37 +13:00
cramfs common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
ext4 common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fat fs: fat: fix file_fat_detectfs() 2021-04-10 12:00:24 +02:00
jffs2 JFFS2: fix jffs2 summary datacrc status uninitialized 2021-04-07 10:22:22 -04:00
reiserfs common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sandbox common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
squashfs fs/squashfs: fix reading of fragmented files 2021-06-09 20:58:20 -04:00
ubifs common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
yaffs2 common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
zfs common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig fs/squashfs: new filesystem 2020-08-07 22:31:32 -04:00
Makefile fs/squashfs: new filesystem 2020-08-07 22:31:32 -04:00
fs.c cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions 2021-04-22 14:09:45 -04:00
fs_internal.c fs: convert error and debug messages to log 2020-09-06 21:21:41 +02:00