From 167342cf41fecfcb04928a97b010c196e6d8a2ee Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Tue, 18 Jun 2019 10:43:05 +0800 Subject: [PATCH] =?UTF-8?q?[dfs]=20fix=20some=20bug=20for=20uffs=20filesys?= =?UTF-8?q?tem.|=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80=E4=BA=9Buffs=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=B3=BB=E7=BB=9F=E7=9A=84BUG.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/filesystems/uffs/dfs_uffs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/dfs/filesystems/uffs/dfs_uffs.c b/components/dfs/filesystems/uffs/dfs_uffs.c index c89102f3e3..fb8caf9dd7 100644 --- a/components/dfs/filesystems/uffs/dfs_uffs.c +++ b/components/dfs/filesystems/uffs/dfs_uffs.c @@ -226,7 +226,7 @@ static int dfs_uffs_mkfs(rt_device_t dev_id) } /*2. then unmount the partition */ - uffs_Mount(nand_part[index].mount_path); + uffs_UnMount(nand_part[index].mount_path); mtd = nand_part[index].dev; /*3. erase all blocks on the partition */ @@ -234,11 +234,13 @@ static int dfs_uffs_mkfs(rt_device_t dev_id) for (; block <= mtd->block_end; block++) { rt_mtd_nand_erase_block(mtd, block); +#if defined(RT_UFFS_USE_CHECK_MARK_FUNCITON) if (rt_mtd_nand_check_block(mtd, block) != RT_EOK) { rt_kprintf("found bad block %d\n", block); rt_mtd_nand_mark_badblock(mtd, block); } +#endif } /*4. remount it */