From 0e01bb1b12ca85e06728c4fc676915201740b8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8E=E9=9D=9E=E7=86=8A?= <38059101+AngryProton@users.noreply.github.com> Date: Mon, 22 Jun 2026 13:53:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[fix][elm]=E8=A7=A3=E5=86=B3=E5=9D=97?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=89=87=E5=8C=BA=E5=A4=A7=E5=B0=8F=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E5=A4=B1=E8=B4=A5=E6=97=B6=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?disk=E6=B3=84=E6=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c b/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c index 90b87a178b4..cb1479f6ca9 100644 --- a/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c @@ -150,8 +150,6 @@ static int dfs_elm_mount(struct dfs_mnt *mnt, unsigned long rwflag, const void * } logic_nbr[0] = '0' + index; - /* save device */ - disk[index] = mnt->dev_id; /* check sector size */ if (rt_device_control(mnt->dev_id, RT_DEVICE_CTRL_BLK_GETGEOME, &geometry) == RT_EOK) { @@ -162,6 +160,8 @@ static int dfs_elm_mount(struct dfs_mnt *mnt, unsigned long rwflag, const void * return -EINVAL; } } + /* save device */ + disk[index] = mnt->dev_id; fat = (FATFS *)rt_malloc(sizeof(FATFS)); if (fat == RT_NULL) From 70ae89fab617a936fbcb1960b21147d2e0affaf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8E=E9=9D=9E=E7=86=8A?= <38059101+AngryProton@users.noreply.github.com> Date: Mon, 22 Jun 2026 16:19:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[fix][dfsv1][elm]=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=9D=97=E8=AE=BE=E5=A4=87=E6=89=87=E5=8C=BA=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=A4=B1=E8=B4=A5=E6=97=B6=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84disk=E6=B3=84=E6=BC=8F=E9=97=AE=E9=A2=98?= 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 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c b/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c index effd1bcd7c7..afb2a0d46d9 100644 --- a/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c @@ -117,8 +117,6 @@ int dfs_elm_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *d return -ENOENT; logic_nbr[0] = '0' + index; - /* save device */ - disk[index] = fs->dev_id; /* check sector size */ if (rt_device_control(fs->dev_id, RT_DEVICE_CTRL_BLK_GETGEOME, &geometry) == RT_EOK) { @@ -128,6 +126,8 @@ int dfs_elm_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *d return -EINVAL; } } + /* save device */ + disk[index] = fs->dev_id; fat = (FATFS *)rt_malloc(sizeof(FATFS)); if (fat == RT_NULL)