Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dfsv1貌似也有这个问题,可以帮忙一起修正下吗?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK的

/* check sector size */
if (rt_device_control(mnt->dev_id, RT_DEVICE_CTRL_BLK_GETGEOME, &geometry) == RT_EOK)
{
Expand All @@ -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)
Expand Down
Loading