[PATCH] fs: fat: fix build of the fuzz test without FS_FAT_LFN

Sascha Hauer s.hauer at pengutronix.de
Mon Nov 23 23:26:06 PST 2026


On 2026-11-24 08:05, Ahmad Fatoum wrote:
> On 11/19/26 09:40, Ahmad Fatoum wrote:
> > From: Ahmad Fatoum <a.fatoum at barebox.org>
> > 
> > The lfname and lfsize members of FILINFO only exist with long file name
> > support, so guarding their use with IS_ENABLED() isn't enough and the
> > build fails with CONFIG_FS_FAT_LFN disabled.
> > 
> > Declare the buffer and assign the members in a single #ifdef block, and
> > zero-initialize the FILINFO per directory entry rather than memset() it.
> > 
> > Fixes: f585092b1737 ("fs: fat: add fuzz test for FAT filesystem")
> > Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
> 
> Sascha's file system conformance series fixes the same issue with the difference
> that this patch here gets away with a single #ifdef instead of two.
> 
> Both are fine by me, but I thought this to be a bit less of an eye sore.

Indeed. I added a follow up updating to your version.

Sascha

--
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list