From 2f2a0b7a75858b9260828dccb4ac54bb0752c1da Mon Sep 17 00:00:00 2001 From: yinjiaming Date: Tue, 10 Jan 2023 15:49:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8Dstatfs=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=86=85=E9=83=A8=E5=88=A4=E6=96=AD=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 9606c024..1c43bb8d 100644 --- a/components/fs/vfs/vfs_fs.c +++ b/components/fs/vfs/vfs_fs.c @@ -750,7 +750,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);