Lines Matching refs:path
20 char* FAST_FUNC xmalloc_readlink(const char *path) in xmalloc_readlink() argument
30 readsize = readlink(path, buf, bufsize); in xmalloc_readlink()
52 char* FAST_FUNC xmalloc_follow_symlinks(const char *path) in xmalloc_follow_symlinks() argument
60 buf = xstrdup(path); in xmalloc_follow_symlinks()
94 char* FAST_FUNC xmalloc_readlink_or_warn(const char *path) in xmalloc_readlink_or_warn() argument
96 char *buf = xmalloc_readlink(path); in xmalloc_readlink_or_warn()
103 bb_error_msg("%s: cannot read link: %s", path, errmsg); in xmalloc_readlink_or_warn()
108 char* FAST_FUNC xmalloc_realpath(const char *path) in xmalloc_realpath() argument
117 return realpath(path, NULL); in xmalloc_realpath()
122 return xstrdup(realpath(path, buf)); in xmalloc_realpath()
126 char* FAST_FUNC xmalloc_realpath_coreutils(char *path) in xmalloc_realpath_coreutils() argument
131 buf = xmalloc_realpath(path); in xmalloc_realpath_coreutils()
143 target = xmalloc_readlink(path); in xmalloc_realpath_coreutils()
172 while (path[0] == '/' && path[1] == '/') in xmalloc_realpath_coreutils()
173 ++path; in xmalloc_realpath_coreutils()
174 i = strlen(path) - 1; in xmalloc_realpath_coreutils()
175 while (i > 0 && path[i] == '/') in xmalloc_realpath_coreutils()
177 c = path[i + 1]; in xmalloc_realpath_coreutils()
178 path[i + 1] = '\0'; in xmalloc_realpath_coreutils()
180 last_slash = strrchr(path, '/'); in xmalloc_realpath_coreutils()
181 if (last_slash == path) in xmalloc_realpath_coreutils()
182 buf = xstrdup(path); in xmalloc_realpath_coreutils()
185 buf = xmalloc_realpath(path); in xmalloc_realpath_coreutils()
194 path[i + 1] = c; in xmalloc_realpath_coreutils()