fix: littlefs readdir在完全读完后,会设置错误码EBADF

【背景】littlefs readdir在完全读完后,会设置错误码EBADF

【修改方案】
1,  fsFops->readdir 执行返回非0时,有可能是正常情况,因此删除else赋值错误码

【影响】
对现有的产品编译不会有影响。
re #I5M1OE
Signed-off-by: wangchen <wangchen240@huawei.com>
This commit is contained in:
wangchen 2022-08-12 08:53:13 +00:00
parent eb40e4a068
commit 2ce5ce9397
1 changed files with 0 additions and 2 deletions

View File

@ -709,8 +709,6 @@ static struct dirent *VfsReaddir(DIR *d)
(dir->dMp->mFs->fsFops->readdir != NULL)) {
if (dir->dMp->mFs->fsFops->readdir(dir, &dir->dDent) == 0) {
ret = &dir->dDent;
} else {
VFS_ERRNO_SET(EBADF);
}
} else {
VFS_ERRNO_SET(ENOTSUP);