update dfs_xxx_mkfs in jffs2 nand uffs.c to use new args

This commit is contained in:
prife 2013-01-08 20:30:57 +08:00
parent 1e6bf8671c
commit 4bc0347b11
2 changed files with 657 additions and 659 deletions

View File

@ -222,7 +222,7 @@ static int dfs_jffs2_unmount(struct dfs_filesystem* fs)
return -DFS_STATUS_ENOENT;
}
static int dfs_jffs2_mkfs(const char* device_name)
static int dfs_jffs2_mkfs(rt_device_t dev_id)
{
/* just erase all blocks on this nand partition */
return -DFS_STATUS_ENOSYS;

View File

@ -207,7 +207,7 @@ static int dfs_uffs_unmount(struct dfs_filesystem* fs)
return -DFS_STATUS_ENOENT;
}
static int dfs_uffs_mkfs(const char* device_name)
static int dfs_uffs_mkfs(rt_device_t dev_id)
{
rt_base_t index;
rt_uint32_t block;
@ -216,15 +216,13 @@ static int dfs_uffs_mkfs(const char* device_name)
/*1. find the device index */
for (index = 0; index < UFFS_DEVICE_MAX; index++)
{
if (rt_strncmp(nand_part[index].dev->parent.parent.name,
device_name, RT_NAME_MAX) == 0)
if (nand_part[index].dev == (struct rt_mtd_nand_device *)dev_id)
break;
}
if (index == UFFS_DEVICE_MAX)
{
/* can't find device driver */
rt_kprintf("can not find device driver: %s\n", device_name);
return -DFS_STATUS_ENOENT;
}