diff options
| author | armink <[email protected]> | 2018-11-02 10:14:08 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2018-11-02 10:20:30 +0800 |
| commit | 83b7b763b7b40f53f4fcb39483fc6e387d5d4632 (patch) | |
| tree | 84eeee8a21ca14c85398f1c6d8a632b4c046f617 /components/dfs/src | |
| parent | 5a70247898dc681534c75d88fd3f188a63888080 (diff) | |
The dbg_log API is DISCARDED. Change all dbg_log to LOG_X.
Diffstat (limited to 'components/dfs/src')
| -rw-r--r-- | components/dfs/src/dfs.c | 2 | ||||
| -rw-r--r-- | components/dfs/src/dfs_file.c | 18 | ||||
| -rw-r--r-- | components/dfs/src/dfs_fs.c | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index d8cd09baa2..38a1813421 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -185,7 +185,7 @@ int fd_new(void) if (idx == fdt->maxfd) { idx = -(1 + DFS_FD_OFFSET); - dbg_log(DBG_ERROR, "DFS fd new is failed! Could not found an empty fd entry."); + LOG_E( "DFS fd new is failed! Could not found an empty fd entry."); goto __result; } diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index 89e4bff5dd..646ae58e36 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -46,7 +46,7 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags) return -ENOMEM; } - dbg_log(DBG_LOG, "open file:%s\n", fullpath); + LOG_D("open file:%s", fullpath); /* Check whether file is already open */ if (fd_is_open(fullpath) == 0) @@ -65,7 +65,7 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags) return -ENOENT; } - dbg_log(DBG_LOG, "open in filesystem:%s\n", fs->ops->name); + LOG_D("open in filesystem:%s", fs->ops->name); fd->fops = fs->ops->fops; /* set file ops */ /* initialize the fd item */ @@ -82,7 +82,7 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags) else fd->path = rt_strdup(dfs_subdir(fs->path, fullpath)); rt_free(fullpath); - dbg_log(DBG_LOG, "Actual file path: %s\n", fd->path); + LOG_D("Actual file path: %s", fd->path); } else { @@ -105,7 +105,7 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags) rt_free(fd->path); fd->path = NULL; - dbg_log(DBG_ERROR, "open failed\n"); + LOG_E("open failed"); return result; } @@ -117,7 +117,7 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags) fd->flags |= DFS_F_DIRECTORY; } - dbg_log(DBG_INFO, "open successful\n"); + LOG_I("open successful"); return 0; } @@ -375,8 +375,8 @@ int dfs_file_stat(const char *path, struct stat *buf) if ((fs = dfs_filesystem_lookup(fullpath)) == NULL) { - dbg_log(DBG_ERROR, - "can't find mounted filesystem on this path:%s\n", fullpath); + LOG_E( + "can't find mounted filesystem on this path:%s", fullpath); rt_free(fullpath); return -ENOENT; @@ -405,8 +405,8 @@ int dfs_file_stat(const char *path, struct stat *buf) if (fs->ops->stat == NULL) { rt_free(fullpath); - dbg_log(DBG_ERROR, - "the filesystem didn't implement this function\n"); + LOG_E( + "the filesystem didn't implement this function"); return -ENOSYS; } diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c index fb970488dd..a183e7f124 100644 --- a/components/dfs/src/dfs_fs.c +++ b/components/dfs/src/dfs_fs.c @@ -55,7 +55,7 @@ int dfs_register(const struct dfs_filesystem_ops *ops) if (empty == NULL) { rt_set_errno(-ENOSPC); - dbg_log(DBG_ERROR, "There is no space to register this file system (%d).\n", ops->name); + LOG_E("There is no space to register this file system (%d).", ops->name); ret = -1; } else if (ret == RT_EOK) @@ -304,7 +304,7 @@ int dfs_mount(const char *device_name, if ((fs == NULL) && (iter == &filesystem_table[DFS_FILESYSTEMS_MAX])) { rt_set_errno(-ENOSPC); - dbg_log(DBG_ERROR, "There is no space to mount this file system (%s).\n", filesystemtype); + LOG_E("There is no space to mount this file system (%s).", filesystemtype); goto err1; } @@ -437,7 +437,7 @@ int dfs_mkfs(const char *fs_name, const char *device_name) if (dev_id == NULL) { rt_set_errno(-ENODEV); - dbg_log(DBG_ERROR, "Device (%s) was not found\n", device_name); + LOG_E("Device (%s) was not found", device_name); return -1; } @@ -458,7 +458,7 @@ int dfs_mkfs(const char *fs_name, const char *device_name) const struct dfs_filesystem_ops *ops = filesystem_operation_table[index]; if (ops->mkfs == NULL) { - dbg_log(DBG_ERROR, "The file system (%s) mkfs function was not implement\n", fs_name); + LOG_E("The file system (%s) mkfs function was not implement", fs_name); rt_set_errno(-ENOSYS); return -1; } @@ -466,7 +466,7 @@ int dfs_mkfs(const char *fs_name, const char *device_name) return ops->mkfs(dev_id); } - dbg_log(DBG_ERROR, "File system (%s) was not found.\n", fs_name); + LOG_E("File system (%s) was not found.", fs_name); return -1; } |
