From: Marek Vasut Date: Sun, 13 Apr 2025 08:55:02 +0000 (+0200) Subject: fs: exfat: Fix exfat_fs_exists() return value X-Git-Tag: v2025.07-rc1~44^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e168a57c3532487b24348351f71f9f6ce7d671ee;p=pandora-u-boot.git fs: exfat: Fix exfat_fs_exists() return value The exfat_fs_exists() should return 0 in case the path does not exist, and 1 in case the path does exist. Fix the inverted return value. This fixes 'test -e' command with exfat. Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer") Signed-off-by: Marek Vasut --- diff --git a/fs/exfat/io.c b/fs/exfat/io.c index 004ba5d3e45..43c05713ed0 100644 --- a/fs/exfat/io.c +++ b/fs/exfat/io.c @@ -875,11 +875,11 @@ int exfat_fs_exists(const char *filename) err = exfat_lookup_realpath(&ctxt.ef, &node, filename); if (err) - return err; + return 0; exfat_put_node(&ctxt.ef, node); - return 0; + return 1; } int exfat_fs_size(const char *filename, loff_t *size)