update dfs_xxx_mkfs in jffs2 nand uffs.c to use new args
This commit is contained in:
parent
1e6bf8671c
commit
4bc0347b11
components/dfs/filesystems
@ -222,7 +222,7 @@ static int dfs_jffs2_unmount(struct dfs_filesystem* fs)
|
|||||||
return -DFS_STATUS_ENOENT;
|
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 */
|
/* just erase all blocks on this nand partition */
|
||||||
return -DFS_STATUS_ENOSYS;
|
return -DFS_STATUS_ENOSYS;
|
||||||
|
@ -207,7 +207,7 @@ static int dfs_uffs_unmount(struct dfs_filesystem* fs)
|
|||||||
return -DFS_STATUS_ENOENT;
|
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_base_t index;
|
||||||
rt_uint32_t block;
|
rt_uint32_t block;
|
||||||
@ -216,15 +216,13 @@ static int dfs_uffs_mkfs(const char* device_name)
|
|||||||
/*1. find the device index */
|
/*1. find the device index */
|
||||||
for (index = 0; index < UFFS_DEVICE_MAX; index++)
|
for (index = 0; index < UFFS_DEVICE_MAX; index++)
|
||||||
{
|
{
|
||||||
if (rt_strncmp(nand_part[index].dev->parent.parent.name,
|
if (nand_part[index].dev == (struct rt_mtd_nand_device *)dev_id)
|
||||||
device_name, RT_NAME_MAX) == 0)
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index == UFFS_DEVICE_MAX)
|
if (index == UFFS_DEVICE_MAX)
|
||||||
{
|
{
|
||||||
/* can't find device driver */
|
/* can't find device driver */
|
||||||
rt_kprintf("can not find device driver: %s\n", device_name);
|
|
||||||
return -DFS_STATUS_ENOENT;
|
return -DFS_STATUS_ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user