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

Sascha Hauer s.hauer at pengutronix.de
Mon Nov 23 23:04:21 PST 2026


On 2026-11-19 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>
> ---
>  fs/fat/fat.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Already applied as 78244e2080 ("fs: fat: fix building without CONFIG_FS_FAT_LFN")

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