[PATCH 2/7] fs: exfat: Inhibit "impossible" print on write to bogus file

Marek Vasut marex at denx.de
Sun Apr 13 10:55:00 CEST 2025


Write into a bogus file, like '/.', triggers an "impossible"
print from the exfat core code. That should not be printed
in U-Boot, because U-Boot prints its own error message sooner.
Inhibit this error message.

The following command triggers the bogus print:
"
=> save host 0:0 1000008 /. 0x10
"

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut <marex at denx.de>
---
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Mattijs Korpershoek <mkorpershoek at baylibre.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
 fs/exfat/lookup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/exfat/lookup.c b/fs/exfat/lookup.c
index 9867aab95f3..1d9aae9e036 100644
--- a/fs/exfat/lookup.c
+++ b/fs/exfat/lookup.c
@@ -218,8 +218,9 @@ int exfat_split(struct exfat* ef, struct exfat_node** parent,
 		exfat_put_node(ef, *parent);
 		*parent = *node;
 	}
+#ifndef __UBOOT__
 	exfat_bug("impossible");
-#ifdef __UBOOT__
+#else
 	return 0;
 #endif
 }
-- 
2.47.2



More information about the U-Boot mailing list