Browse Source

fix bug in dfs_jffs2_statfs.buf->f_bfree should be the free blocks, not bytes.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2048 bbd45198-f89e-11dd-88c7-29a3b14d5316
goprife@gmail.com 13 years ago
parent
commit
3467396926
1 changed files with 1 additions and 7 deletions
  1. 1 7
      components/dfs/filesystems/jffs2/dfs_jffs2.c

+ 1 - 7
components/dfs/filesystems/jffs2/dfs_jffs2.c

@@ -244,14 +244,8 @@ static int dfs_jffs2_statfs(struct dfs_filesystem* fs,
 	jffs2_get_info_from_sb((void *)mte->data, &info);
 	jffs2_get_info_from_sb((void *)mte->data, &info);
 	buf->f_bsize = info.sector_size; 
 	buf->f_bsize = info.sector_size; 
 	buf->f_blocks = info.nr_blocks;
 	buf->f_blocks = info.nr_blocks;
-	buf->f_bfree = info.free_size; //fixme need test!
+	buf->f_bfree = info.free_size / info.sector_size;
 	
 	
-//	jffs2_sb = (struct super_block)(mte->data);
-//	c = JFFS2_SB_INFO(jffs2_sb);
-//	
-//	buf->f_bsize = c->sector_size; 
-//	buf->f_blocks = c->nr_blocks;
-//	buf->f_bfree = c->free_size; //fixme need test!
 	return 0;
 	return 0;
 }
 }