diff options
| author | HubretXie <[email protected]> | 2019-04-28 15:14:42 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-04-28 15:14:42 +0800 |
| commit | 08a9887a28de879bbb4c8801d6c065a45e0beed8 (patch) | |
| tree | 21abaa91d5b0549ec6496412ad928810a27c1f5f /components/dfs/src | |
| parent | 25cdd8bba95499656594a1d3dfd42fd014df1f9f (diff) | |
| parent | b57e075867ec075f520863757906ced4d181357e (diff) | |
Merge pull request #3 from RT-Thread/master
sync
Diffstat (limited to 'components/dfs/src')
| -rw-r--r-- | components/dfs/src/dfs_file.c | 2 | ||||
| -rw-r--r-- | components/dfs/src/dfs_fs.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index 81cab2ed79..65fd0c45e8 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -99,7 +99,7 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags) rt_free(fd->path); fd->path = NULL; - LOG_E("open failed"); + LOG_D("%s open failed", fullpath); return result; } diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c index 0f69ad2e3e..04d862e85d 100644 --- a/components/dfs/src/dfs_fs.c +++ b/components/dfs/src/dfs_fs.c @@ -444,7 +444,7 @@ int dfs_mkfs(const char *fs_name, const char *device_name) /* lock file system */ dfs_lock(); /* find the file system operations */ - for (index = 0; index <= DFS_FILESYSTEM_TYPES_MAX; index ++) + for (index = 0; index < DFS_FILESYSTEM_TYPES_MAX; index ++) { if (filesystem_operation_table[index] != NULL && strcmp(filesystem_operation_table[index]->name, fs_name) == 0) @@ -452,7 +452,7 @@ int dfs_mkfs(const char *fs_name, const char *device_name) } dfs_unlock(); - if (index <= DFS_FILESYSTEM_TYPES_MAX) + if (index < DFS_FILESYSTEM_TYPES_MAX) { /* find file system operation */ const struct dfs_filesystem_ops *ops = filesystem_operation_table[index]; |
