提交 f886283b 编写于 作者: O openharmony_ci 提交者: Gitee

!364 fix:修复文件系统vfs层未正确判空g_fs的问题

Merge pull request !364 from Far/master
......@@ -347,14 +347,14 @@ ssize_t read(int fd, void *buf, size_t nbyte)
return recv(fd, buf, nbyte, 0);
}
#endif
if (g_fs->fsFops == NULL || g_fs->fsFops->Read == NULL) {
errno = ENOSYS;
return FS_FAILURE;
}
if (g_fs == NULL) {
errno = ENODEV;
return FS_FAILURE;
}
if (g_fs->fsFops == NULL || g_fs->fsFops->Read == NULL) {
errno = ENOSYS;
return FS_FAILURE;
}
return g_fs->fsFops->Read(fd, buf, nbyte);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册