Lines Matching refs:fullpath
70 static int _get_parent_path(const char *fullpath, char *path) in _get_parent_path() argument
75 char *full_path = rt_strdup(fullpath); in _get_parent_path()
395 char *dfs_file_realpath(struct dfs_mnt **mnt, const char *fullpath, int mode) in dfs_file_realpath() argument
401 if (*mnt && fullpath) in dfs_file_realpath()
414 len = rt_strlen(fullpath); in dfs_file_realpath()
421 rt_strcpy(tmp_path + index, fullpath); in dfs_file_realpath()
425 path_len = _get_parent_path(fullpath, path); in dfs_file_realpath()
568 char *fullpath = RT_NULL; in dfs_file_open() local
579 fullpath = dfs_normalize_path(NULL, path); in dfs_file_open()
580 if (fullpath) in dfs_file_open()
584 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_open()
585 mnt = dfs_mnt_lookup(fullpath); in dfs_file_open()
588 char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_LAST); in dfs_file_open()
591 rt_free(fullpath); in dfs_file_open()
592 fullpath = tmp; in dfs_file_open()
595 DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_open()
596 dentry = dfs_dentry_lookup(mnt, fullpath, oflags); in dfs_file_open()
609 char *path = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_ONLY_LAST); in dfs_file_open()
666 … DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dfs_dentry_create(%s)", fullpath); in dfs_file_open()
668 dentry = dfs_dentry_create(mnt, fullpath); in dfs_file_open()
819 if (fullpath != NULL) in dfs_file_open()
821 rt_free(fullpath); in dfs_file_open()
1252 char *fullpath = RT_NULL; in dfs_file_stat() local
1256 fullpath = dfs_normalize_path(NULL, path); in dfs_file_stat()
1257 if (fullpath) in dfs_file_stat()
1259 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_stat()
1260 mnt = dfs_mnt_lookup(fullpath); in dfs_file_stat()
1263 char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_NONE); in dfs_file_stat()
1266 rt_free(fullpath); in dfs_file_stat()
1267 fullpath = tmp; in dfs_file_stat()
1270 … DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dentry = dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_stat()
1271 dentry = dfs_dentry_lookup(mnt, fullpath, 0); in dfs_file_stat()
1292 rt_free(fullpath); in dfs_file_stat()
1293 fullpath = RT_NULL; in dfs_file_stat()
1321 char *fullpath = RT_NULL; in dfs_file_lstat() local
1325 fullpath = dfs_normalize_path(NULL, path); in dfs_file_lstat()
1326 if (fullpath) in dfs_file_lstat()
1328 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_lstat()
1329 mnt = dfs_mnt_lookup(fullpath); in dfs_file_lstat()
1332 char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_LAST); in dfs_file_lstat()
1335 rt_free(fullpath); in dfs_file_lstat()
1336 fullpath = tmp; in dfs_file_lstat()
1339 … DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dentry = dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_lstat()
1340 dentry = dfs_dentry_lookup(mnt, fullpath, 0); in dfs_file_lstat()
1361 rt_free(fullpath); in dfs_file_lstat()
1362 fullpath = RT_NULL; in dfs_file_lstat()
1430 char *fullpath = RT_NULL; in dfs_file_setattr() local
1434 fullpath = dfs_normalize_path(NULL, path); in dfs_file_setattr()
1435 if (fullpath) in dfs_file_setattr()
1437 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_setattr()
1438 mnt = dfs_mnt_lookup(fullpath); in dfs_file_setattr()
1441 char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_LAST); in dfs_file_setattr()
1444 rt_free(fullpath); in dfs_file_setattr()
1445 fullpath = tmp; in dfs_file_setattr()
1448 … DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dentry = dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_setattr()
1449 dentry = dfs_dentry_lookup(mnt, fullpath, 0); in dfs_file_setattr()
1470 rt_free(fullpath); in dfs_file_setattr()
1471 fullpath = RT_NULL; in dfs_file_setattr()
1685 char *fullpath = RT_NULL; in dfs_file_unlink() local
1689 fullpath = dfs_normalize_path(NULL, path); in dfs_file_unlink()
1690 if (fullpath) in dfs_file_unlink()
1692 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_unlink()
1693 mnt = dfs_mnt_lookup(fullpath); in dfs_file_unlink()
1696 char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_LAST); in dfs_file_unlink()
1699 rt_free(fullpath); in dfs_file_unlink()
1700 fullpath = tmp; in dfs_file_unlink()
1703 if (strcmp(mnt->fullpath, fullpath) != 0) in dfs_file_unlink()
1705 DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_unlink()
1706 dentry = dfs_dentry_lookup(mnt, fullpath, 0); in dfs_file_unlink()
1711 has_child = dfs_mnt_has_child_mnt(mnt, fullpath); in dfs_file_unlink()
1760 rt_free(fullpath); in dfs_file_unlink()
1892 char *fullpath = RT_NULL, *parent = RT_NULL; in dfs_file_symlink() local
1900 fullpath = dfs_normalize_path(NULL, linkpath); in dfs_file_symlink()
1904 fullpath = (char*)linkpath; in dfs_file_symlink()
1908 if (dfs_file_access(fullpath, O_RDONLY) != 0) in dfs_file_symlink()
1913 index = strrchr(fullpath, '/'); in dfs_file_symlink()
1916 int length = index - fullpath; in dfs_file_symlink()
1922 memcpy(parent, fullpath, length); in dfs_file_symlink()
1939 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_symlink()
1950 … DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_symlink()
2006 if (fullpath != linkpath) in dfs_file_symlink()
2007 rt_free(fullpath); in dfs_file_symlink()
2037 char *fullpath = RT_NULL; in dfs_file_readlink() local
2041 fullpath = dfs_normalize_path(NULL, path); in dfs_file_readlink()
2042 if (fullpath) in dfs_file_readlink()
2044 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_readlink()
2045 mnt = dfs_mnt_lookup(fullpath); in dfs_file_readlink()
2048 char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_LAST); in dfs_file_readlink()
2051 rt_free(fullpath); in dfs_file_readlink()
2052 fullpath = tmp; in dfs_file_readlink()
2055 DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_readlink()
2056 dentry = dfs_dentry_lookup(mnt, fullpath, 0); in dfs_file_readlink()
2086 rt_free(fullpath); in dfs_file_readlink()
2361 char *fullpath = RT_NULL; in dfs_file_isdir() local
2365 fullpath = dfs_normalize_path(NULL, path); in dfs_file_isdir()
2366 if (fullpath) in dfs_file_isdir()
2368 DLOG(msg, "dfs_file", "mnt", DLOG_MSG, "dfs_mnt_lookup(%s)", fullpath); in dfs_file_isdir()
2369 mnt = dfs_mnt_lookup(fullpath); in dfs_file_isdir()
2372 char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_NONE); in dfs_file_isdir()
2375 rt_free(fullpath); in dfs_file_isdir()
2376 fullpath = tmp; in dfs_file_isdir()
2379 … DLOG(msg, "dfs_file", "dentry", DLOG_MSG, "dentry = dfs_dentry_lookup(mnt, %s)", fullpath); in dfs_file_isdir()
2380 dentry = dfs_dentry_lookup(mnt, fullpath, 0); in dfs_file_isdir()
2411 rt_free(fullpath); in dfs_file_isdir()
2412 fullpath = RT_NULL; in dfs_file_isdir()
2542 char *fullpath, *path; in ls() local
2590 fullpath = dfs_normalize_path(path, dirent.d_name); in ls()
2591 if (fullpath == NULL) in ls()
2594 DLOG(msg, "dfs", "dfs_file", DLOG_MSG, "dfs_file_lstat(%s, &stat)", fullpath); in ls()
2595 if (dfs_file_lstat(fullpath, &stat) == 0) in ls()
2608 ret = dfs_file_readlink(fullpath, link_fn, DFS_PATH_MAX); in ls()
2614 mnt = dfs_mnt_lookup(fullpath); in ls()
2617 … char *tmp = dfs_file_realpath(&mnt, fullpath, DFS_REALPATH_EXCEPT_LAST); in ls()
2622 index = strrchr(fullpath, '/'); in ls()
2625 int length = index - fullpath; in ls()
2629 rt_memcpy(parent, fullpath, length); in ls()
2676 rt_free(fullpath); in ls()