提交 3ea99e46 编写于 作者: G goprife@gmail.com

fix bug in dfs_elm.c the fat->drv to index, because fat->drv is uninitialized in f_mount.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2256 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 526de394
...@@ -107,7 +107,7 @@ int dfs_elm_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *d ...@@ -107,7 +107,7 @@ int dfs_elm_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *d
char drive[8]; char drive[8];
DIR * dir; DIR * dir;
rt_snprintf(drive, sizeof(drive), "%d:/", fat->drv); rt_snprintf(drive, sizeof(drive), "%d:/", index);
dir = (DIR *)rt_malloc(sizeof(DIR)); dir = (DIR *)rt_malloc(sizeof(DIR));
if (dir == RT_NULL) if (dir == RT_NULL)
return -DFS_STATUS_ENOMEM; return -DFS_STATUS_ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册