Lines Matching defs:path
2 * ntp_realpath.c - get real path for a file
52 /* On Windows, we assume 2k for a file path is enough. */
56 realpath1(const char *path, char *resolved)
64 if (!strncmp(path, "\\\\.\\", 4)) {
65 if (strlcpy(resolved, path, NTP_PATH_MAX) >= NTP_PATH_MAX)
69 } else if ((retval = _fullpath(resolved, path, NTP_PATH_MAX)) == NULL) {
87 * values for maxmimum path length and symlink chains/loops. Adjust with
94 * Find the real name of path, by removing all ".", ".." and symlink
96 * in which case the path which caused trouble is left in (resolved).
99 realpath1(const char *path, char *resolved)
109 if (path[0] == '/') {
112 if (path[1] == '\0')
115 left_len = strlcpy(left, path + 1, sizeof(left));
123 left_len = strlcpy(left, path, sizeof(left));
131 * Iterate over path components in `left'.
135 * Extract the next path component and adjust `left'
167 * Strip the last path component except when we have
180 * Append the next path component and lstat() it.
210 /* Strip the last path component. */
217 * If there are any path components left, then
258 ntp_realpath(const char * path)
262 return realpath(path, NULL);
267 if (path == NULL)
269 else if (path[0] == '\0')
273 else if ((res = realpath1(path, m)) == NULL)