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:
parent
eb40e4a068
commit
2ce5ce9397
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue