Browse Source

[DFS_V2]Update dfs_elm.c 修复变量使用错误 (#7776)

zhkag 2 years ago
parent
commit
7b4e52bd79
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c

+ 1 - 1
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);
         st->st_blksize = fat->csize * SS(fat);
         if (file_info.fattrib & AM_ARC)
         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
             st->st_blocks *= (st->st_blksize / 512);  // man say st_blocks is number of 512B blocks allocated
         }
         }
         else
         else