From a9cdef1cd4292b9c726cbe18165b6b9b69669553 Mon Sep 17 00:00:00 2001 From: yinjiaming Date: Tue, 10 Jan 2023 15:49:01 +0800 Subject: [PATCH] =?UTF-8?q?fixed=202f2a0b7=20from=20https://gitee.com/hgbv?= =?UTF-8?q?eiu743/kernel=5Fliteos=5Fm/pulls/1006=20fix:=E4=BF=AE=E5=A4=8Ds?= =?UTF-8?q?tatfs=E5=87=BD=E6=95=B0=E5=86=85=E9=83=A8=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复函数调用的是statfs却用stat!=NULL来判断,当文件系统是little_fs时导致死机的问题。 close #I69BXB Signed-off-by: yinjiaming Change-Id: Ib9784c017f4260433c3f12e352470108ea83ec19 --- components/fs/vfs/vfs_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fs/vfs/vfs_fs.c b/components/fs/vfs/vfs_fs.c index a94c18b4..2b6f2b8e 100644 --- a/components/fs/vfs/vfs_fs.c +++ b/components/fs/vfs/vfs_fs.c @@ -749,7 +749,7 @@ int statfs(const char *path, struct statfs *buf) return MapToPosixRet(ret); } - if (mp->mFs->fsFops->stat != NULL) { + if (mp->mFs->fsMops->statfs != NULL) { ret = mp->mFs->fsMops->statfs(pathInMp, buf); } else { VFS_ERRNO_SET(ENOTSUP);