libfstools: skip JFFS2 padding when BLOCKSIZE was given master
authorDaniel Golle <daniel@makrotopia.org>
Sun, 14 Jul 2024 18:21:09 +0000 (19:21 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 14 Jul 2024 18:40:03 +0000 (19:40 +0100)
commit408c2cc48e6694446c89da7f8121b399063e1067
treee0b9da3dcb2b2ce2cad31b52f1753891abf5f48f
parent013050f8db8779f23333397245af5404c8c2306b
libfstools: skip JFFS2 padding when BLOCKSIZE was given

When BLOCKSIZE is defined we call padjffs2 with the defined alignment
to pad towards. That results in one of more block of all-1s instead of
the expected 0xdeadc0de and ultimaltely breaks restoring configuration
as fstools won't look for a the GZ signature indicating the config
backup in this case.
Change that and also look for config backup when all-1s are used for
padding.

Fixes: ee54c6b ("libfstools: skip JFFS2 padding on block devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
libfstools/common.c