[PATCH] Fix squashfs failing to load sparse files
Tom Rini
trini at konsulko.com
Wed Jan 20 22:46:44 CET 2021
On Mon, Nov 23, 2020 at 03:40:03PM +1300, Campbell Suter wrote:
> SquashFS supports sprase blocks in files - that is, if a given block is
> composed only of zeros, it's not written to the output file to save
> space and it's on-disk length field is set to zero to indicate that.
>
> Previously the squashfs driver did not recognise that, and would attempt
> to read and decompress a zero-sized block, which obviously failed.
>
> The following command may be used to create a file for testing:
>
> cat <(dd if=/dev/urandom of=/dev/stdout bs=1M count=1) \
> <(dd if=/dev/zero of=/dev/stdout bs=1M count=1) \
> <(dd if=/dev/urandom of=/dev/stdout bs=1k count=200) >test_file
>
> Signed-off-by: Campbell Suter <campbell at snapit.group>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210120/cf53ff9f/attachment.sig>
More information about the U-Boot
mailing list