fix:修复文件系统vfs层未正确判空g_fs的问题
Close #I4ELVA Signed-off-by: Far <yesiyuan2@huawei.com> Change-Id: Id8cbbd6c65df0411f22af11412f01b57fa8c27d1
This commit is contained in:
parent
093af869d5
commit
5e3a29dd97
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue