未验证 提交 e38e996e 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1193 from liu2guang/master

[elm] Fixed elm device unmount error when mounting multiple elm devices.
......@@ -182,6 +182,7 @@ int dfs_elm_unmount(struct dfs_filesystem *fs)
FATFS *fat;
FRESULT result;
int index;
char logic_nbr[2] = {'0',':'};
fat = (FATFS *)fs->data;
......@@ -192,7 +193,8 @@ int dfs_elm_unmount(struct dfs_filesystem *fs)
if (index == -1) /* not found */
return -ENOENT;
result = f_mount(RT_NULL, "", (BYTE)index);
logic_nbr[0] = '0' + index;
result = f_mount(RT_NULL, logic_nbr, (BYTE)1);
if (result != FR_OK)
return elm_result_to_dfs(result);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册