From 7b4e52bd797ca8956f7ac08e0b3d31a8286da8f4 Mon Sep 17 00:00:00 2001 From: zhkag Date: Tue, 4 Jul 2023 20:56:37 +0800 Subject: [PATCH] =?UTF-8?q?[DFS=5FV2]Update=20dfs=5Felm.c=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8F=98=E9=87=8F=E4=BD=BF=E7=94=A8=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20(#7776)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c b/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c index 589bf22f62..f4f27bd273 100644 --- a/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c @@ -829,7 +829,7 @@ int dfs_elm_stat(struct dfs_dentry *dentry, struct stat *st) st->st_blksize = fat->csize * SS(fat); if (file_info.fattrib & AM_ARC) { - st->st_blocks = file_info.fsize ? ((file_info.fsize - 1) / SS(f) / fat->csize + 1) : 0; + st->st_blocks = file_info.fsize ? ((file_info.fsize - 1) / SS(fat) / fat->csize + 1) : 0; st->st_blocks *= (st->st_blksize / 512); // man say st_blocks is number of 512B blocks allocated } else