Lines Matching refs:path
117 static struct dfs_vnode *dfs_vnode_find(const char *path, rt_list_t **hash_head) in dfs_vnode_find() argument
120 int hash = bkdr_hash(path); in dfs_vnode_find()
133 if (rt_strcmp(path, vnode->fullpath) == 0) in dfs_vnode_find()
185 int dfs_file_open(struct dfs_file *fd, const char *path, int flags) in dfs_file_open() argument
198 fullpath = dfs_normalize_path(NULL, path); in dfs_file_open()
247 if (dfs_subdir(fs->path, fullpath) == NULL) in dfs_file_open()
248 vnode->path = rt_strdup("/"); in dfs_file_open()
250 vnode->path = rt_strdup(dfs_subdir(fs->path, fullpath)); in dfs_file_open()
251 LOG_D("Actual file path: %s", vnode->path); in dfs_file_open()
255 vnode->path = fullpath; in dfs_file_open()
264 if (vnode->path != vnode->fullpath) in dfs_file_open()
268 rt_free(vnode->path); in dfs_file_open()
291 if (vnode->path != vnode->fullpath) in dfs_file_open()
295 rt_free(vnode->path); in dfs_file_open()
357 if (vnode->path != vnode->fullpath) in dfs_file_close()
361 rt_free(vnode->path); in dfs_file_close()
484 int dfs_file_unlink(const char *path) in dfs_file_unlink() argument
491 fullpath = dfs_normalize_path(NULL, path); in dfs_file_unlink()
515 if (dfs_subdir(fs->path, fullpath) == NULL) in dfs_file_unlink()
518 result = fs->ops->unlink(fs, dfs_subdir(fs->path, fullpath)); in dfs_file_unlink()
607 int dfs_file_stat(const char *path, struct stat *buf) in dfs_file_stat() argument
613 fullpath = dfs_normalize_path(NULL, path); in dfs_file_stat()
641 const char *subdir = dfs_subdir(fs->path, fullpath); in dfs_file_stat()
704 dfs_subdir(oldfs->path, oldfullpath), in dfs_file_rename()
705 dfs_subdir(newfs->path, newfullpath)); in dfs_file_rename()
791 char *fullpath, *path; in ls() local
798 path = rt_strdup(working_directory); in ls()
800 path = rt_strdup("/"); in ls()
802 if (path == NULL) in ls()
807 path = (char *)pathname; in ls()
812 if (dfs_file_open(&fd, path, O_DIRECTORY) == 0) in ls()
814 rt_kprintf("Directory %s:\n", path); in ls()
824 fullpath = dfs_normalize_path(path, dirent.d_name); in ls()
854 rt_free(path); in ls()
957 extern int mkdir(const char *path, mode_t mode);
1021 static const char *_get_path_lastname(const char *path) in _get_path_lastname() argument
1024 if ((ptr = (char *)strrchr(path, '/')) == NULL) in _get_path_lastname()
1025 return path; in _get_path_lastname()