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

fix bugs in uffs_result_to_dfs and in dfs_uffs_statfs in dfs_uffs.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2025 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 95bcaa08
......@@ -48,6 +48,7 @@ static int uffs_result_to_dfs(int result)
{
int status = -1;
result = result < 0 ? -result : result;
switch (result)
{
case UENOERR:/** no error */
......@@ -270,7 +271,7 @@ static int dfs_uffs_statfs(struct dfs_filesystem* fs,
buf->f_bsize = mtd->page_size;
buf->f_blocks = (mtd->block_size)/(mtd->page_size)*
(mtd->block_start - mtd->block_end + 1);
(mtd->block_end - mtd->block_start + 1);
buf->f_bfree = uffs_GetDeviceFree(&nand_part[index].uffs_dev) / mtd->page_size;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册