From 587580052236840271cc8acff3b1636c73311b00 Mon Sep 17 00:00:00 2001 From: angryproton Date: Tue, 21 Jul 2026 22:57:46 +0800 Subject: [PATCH] =?UTF-8?q?[fix][dfs]=20=E4=BF=AE=E6=AD=A3=20elmfat=20mkfs?= =?UTF-8?q?=20=E4=B8=AD=20f=5Fmount=20=E7=9A=84=E9=94=99=E8=AF=AF=E4=BC=A0?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c | 4 ++-- components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c | 4 ++-- 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 d72b4852fd0..0c9ae7b83ca 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 4d4de5e1230..ac1a4d47e36 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 */