Lines Matching refs:resolved
61 realpath(const char *path, char *resolved) in realpath() argument
77 if (resolved == NULL) { in realpath()
78 resolved = malloc(PATH_MAX); in realpath()
79 if (resolved == NULL) in realpath()
87 resolved[0] = '/'; in realpath()
88 resolved[1] = '\0'; in realpath()
90 return (resolved); in realpath()
94 if (getcwd(resolved, PATH_MAX) == NULL) { in realpath()
96 free(resolved); in realpath()
98 strlcpy(resolved, ".", PATH_MAX); in realpath()
101 resolved_len = strlen(resolved); in realpath()
128 if (resolved[resolved_len - 1] != '/') { in realpath()
133 resolved[resolved_len++] = '/'; in realpath()
134 resolved[resolved_len] = '\0'; in realpath()
146 resolved[resolved_len - 1] = '\0'; in realpath()
147 q = strrchr(resolved, '/') + 1; in realpath()
149 resolved_len = q - resolved; in realpath()
159 resolved_len = strlcat(resolved, next_token, PATH_MAX); in realpath()
164 if (lstat(resolved, &sb) != 0) { in realpath()
167 return (resolved); in realpath()
176 slen = readlink(resolved, symlink, sizeof(symlink) - 1); in realpath()
181 resolved[1] = 0; in realpath()
185 resolved[resolved_len - 1] = '\0'; in realpath()
186 q = strrchr(resolved, '/') + 1; in realpath()
188 resolved_len = q - resolved; in realpath()
220 if (resolved_len > 1 && resolved[resolved_len - 1] == '/') in realpath()
221 resolved[resolved_len - 1] = '\0'; in realpath()
222 return (resolved); in realpath()
226 free(resolved); in realpath()