提交 34673969 编写于 作者: G goprife@gmail.com

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
上级 a321f3da
......@@ -244,14 +244,8 @@ static int dfs_jffs2_statfs(struct dfs_filesystem* fs,
jffs2_get_info_from_sb((void *)mte->data, &info);
buf->f_bsize = info.sector_size;
buf->f_blocks = info.nr_blocks;
buf->f_bfree = info.free_size; //fixme need test!
// 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!
buf->f_bfree = info.free_size / info.sector_size;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册