summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorangryproton <[email protected]>2026-07-21 22:57:46 +0800
committerRbb666 <[email protected]>2026-07-23 11:57:10 +0800
commitf19da943aa905d9be49451e8cbad1a3fae0248b8 (patch)
treeb220a50afba9be076933ccc1d56d1aa4fbb91195
parente01b14c818ba2a44269e5ab6bee91e5459c446e3 (diff)
[fix][dfs] 修正 elmfat mkfs 中 f_mount 的错误传参
-rw-r--r--components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c4
-rw-r--r--components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c b/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c
index 9631bdfa57..ceaccc44b0 100644
--- a/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c
+++ b/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c
@@ -264,7 +264,7 @@ int dfs_elm_mkfs(rt_device_t dev_id, const char *fs_name)
* just fill the FatFS[index] in elm fatfs to make mkfs work.
*/
logic_nbr[0] = '0' + index;
- f_mount(fat, logic_nbr, (BYTE)index);
+ f_mount(fat, logic_nbr, 0); /* opt=0: delayed mount, just register FATFS object */
}
}
else
@@ -284,7 +284,7 @@ int dfs_elm_mkfs(rt_device_t dev_id, const char *fs_name)
/* check flag status, we need clear the temp driver stored in disk[] */
if (flag == FSM_STATUS_USE_TEMP_DRIVER)
{
- f_mount(RT_NULL, logic_nbr, (BYTE)index);
+ f_mount(RT_NULL, logic_nbr, 0);
rt_free(fat);
disk[index] = RT_NULL;
/* close device */
diff --git a/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c b/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c
index a477851e7e..52d3cafdac 100644
--- a/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c
+++ b/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c
@@ -302,7 +302,7 @@ int dfs_elm_mkfs(rt_device_t dev_id, const char *fs_name)
* just fill the FatFS[index] in elm fatfs to make mkfs work.
*/
logic_nbr[0] = '0' + index;
- f_mount(fat, logic_nbr, (BYTE)index);
+ f_mount(fat, logic_nbr, 0); /* opt=0: delayed mount, just register FATFS object */
}
}
else
@@ -322,7 +322,7 @@ int dfs_elm_mkfs(rt_device_t dev_id, const char *fs_name)
/* check flag status, we need clear the temp driver stored in disk[] */
if (flag == FSM_STATUS_USE_TEMP_DRIVER)
{
- f_mount(RT_NULL, logic_nbr, (BYTE)index);
+ f_mount(RT_NULL, logic_nbr, 0);
rt_free(fat);
disk[index] = RT_NULL;
/* close device */