diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c index ee3d29962f6cd07ebfa05baa70bdd3a7a934f1c8..a8c724d8ad979b23191d944a6fce8e249872ab6b 100644 --- a/components/dfs/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/filesystems/elmfat/dfs_elm.c @@ -107,7 +107,7 @@ int dfs_elm_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *d char drive[8]; DIR * dir; - rt_snprintf(drive, sizeof(drive), "%d:/", fat->drv); + rt_snprintf(drive, sizeof(drive), "%d:/", index); dir = (DIR *)rt_malloc(sizeof(DIR)); if (dir == RT_NULL) return -DFS_STATUS_ENOMEM;