This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 6a19264c97a8ed8106303544d120bde0cfe1b5ca
Author: chenrun1 <chenr...@xiaomi.com>
AuthorDate: Mon Nov 18 23:49:42 2024 +0800

    littlefs_fstat:Ignore When the error is LFS_ERR_NOENT, we assume that the 
attr attribute is not set.
    
    Signed-off-by: chenrun1 <chenr...@xiaomi.com>
---
 fs/littlefs/lfs_vfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/littlefs/lfs_vfs.c b/fs/littlefs/lfs_vfs.c
index b6d941b84b..d2d6782e9d 100644
--- a/fs/littlefs/lfs_vfs.c
+++ b/fs/littlefs/lfs_vfs.c
@@ -772,7 +772,7 @@ static int littlefs_fstat(FAR const struct file *filep, FAR 
struct stat *buf)
                                                  &attr, sizeof(attr)));
   if (ret < 0)
     {
-      if (ret != -ENODATA)
+      if (ret != -ENODATA && ret != -ENOENT)
         {
           goto errout;
         }

Reply via email to