change block_size to pages_per_block in dfs_uffs.c and uffs_nandif.c
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2364 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
68ead993ad
commit
b45dfd0a15
|
@ -270,7 +270,7 @@ static int dfs_uffs_statfs(struct dfs_filesystem* fs,
|
|||
return -DFS_STATUS_ENOENT;
|
||||
|
||||
buf->f_bsize = mtd->page_size;
|
||||
buf->f_blocks = (mtd->block_size)/(mtd->page_size)*
|
||||
buf->f_blocks = mtd->pages_per_block*
|
||||
(mtd->block_end - mtd->block_start + 1);
|
||||
buf->f_bfree = uffs_GetDeviceFree(&nand_part[index].uffs_dev) / mtd->page_size;
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ void uffs_setup_storage(
|
|||
|
||||
// attr->total_blocks = nand->end_block - nand->start_block + 1;/* no use */
|
||||
attr->page_data_size = nand->page_size; /* page data size */
|
||||
attr->pages_per_block = nand->block_size / nand->page_size ; /* pages per block */
|
||||
attr->pages_per_block = nand->pages_per_block; /* pages per block */
|
||||
attr->spare_size = nand->oob_size; /* page spare size */
|
||||
attr->block_status_offs = UFFS_BLOCK_MARK_SPARE_OFFSET; /* block status offset is 5th byte in spare */
|
||||
attr->ecc_opt = RT_CONFIG_UFFS_ECC_MODE; /* ecc option */
|
||||
|
|
Loading…
Reference in New Issue