diff options
| author | aozima <[email protected]> | 2020-08-14 16:29:11 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2020-08-14 16:29:11 +0800 |
| commit | 79fd12842beeee5a653ba6f4bc2f08b21be7697a (patch) | |
| tree | 841402b8580e1820179cc79f47f74bd649d49403 /components/dfs | |
| parent | 6bf76a375c53c1de3f1a4b1d0f7fc6506833f6dd (diff) | |
| parent | 5b94c1482e8e63f68ad2437cacf2e60e6737626a (diff) | |
Merge branch 'master' into gitee_master
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/src/dfs_fs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c index 476e47fc06..c21b914727 100644 --- a/components/dfs/src/dfs_fs.c +++ b/components/dfs/src/dfs_fs.c @@ -129,7 +129,7 @@ const char *dfs_filesystem_get_mounted_path(struct rt_device *device) for (iter = &filesystem_table[0]; iter < &filesystem_table[DFS_FILESYSTEMS_MAX]; iter++) { - /* fint the mounted device */ + /* find the mounted device */ if (iter->ops == NULL) continue; else if (iter->dev_id == device) { @@ -321,7 +321,7 @@ int dfs_mount(const char *device_name, if (rt_device_open(fs->dev_id, RT_DEVICE_OFLAG_RDWR) != RT_EOK) { - /* The underlaying device has error, clear the entry. */ + /* The underlying device has error, clear the entry. */ dfs_lock(); memset(fs, 0, sizeof(struct dfs_filesystem)); @@ -568,8 +568,7 @@ int dfs_unmount_device(rt_device_t dev) iter < &filesystem_table[DFS_FILESYSTEMS_MAX]; iter++) { /* check if the PATH is mounted */ - if ((iter->dev_id->parent.name != NULL) - && (strcmp(iter->dev_id->parent.name, dev->parent.name) == 0)) + if (strcmp(iter->dev_id->parent.name, dev->parent.name) == 0) { fs = iter; break; |
