Skip to content

Commit c577929

Browse files
Donny9GUIDINGLI
authored andcommitted
littlefs/stat: return OK when stat success
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
1 parent 0ab637f commit c577929

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/littlefs/lfs_vfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,11 +1573,11 @@ static int littlefs_stat(FAR struct inode *mountpt, FAR const char *relpath,
15731573
goto errout;
15741574
}
15751575

1576-
ret = 0;
15771576
memset(&attr, 0, sizeof(attr));
15781577
attr.at_mode = S_IRWXG | S_IRWXU | S_IRWXO;
15791578
}
15801579

1580+
ret = 0;
15811581
buf->st_mode = attr.at_mode;
15821582
buf->st_uid = attr.at_uid;
15831583
buf->st_gid = attr.at_gid;
@@ -1635,7 +1635,6 @@ static int littlefs_chstat(FAR struct inode *mountpt,
16351635
goto errout;
16361636
}
16371637

1638-
ret = 0;
16391638
memset(&attr, 0, sizeof(attr));
16401639
}
16411640

0 commit comments

Comments
 (0)