From 8baf3d98e157a9c2f7742d7d6c7685caa40dac76 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Sat, 28 Jul 2018 16:34:51 +0800 Subject: [PATCH] [DFS] fix the mkfs issue for multi-mounted fatfs --- components/dfs/filesystems/elmfat/dfs_elm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c index a5dfdd0258..2aa8fb6522 100644 --- a/components/dfs/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/filesystems/elmfat/dfs_elm.c @@ -269,6 +269,10 @@ int dfs_elm_mkfs(rt_device_t dev_id) f_mount(fat, logic_nbr, (BYTE)index); } } + else + { + logic_nbr[0] = '0' + index; + } /* [IN] Logical drive number */ /* [IN] Format options */