Lines Matching defs:path

69 	/* Ignore trailing '/' in path */
328 * Remove last 'updir + 1' tokens from the base path tokens list. This leaves us
330 * path, and returns the decremented size of the token list.
343 * Given the base ("current dir.") path and the relative one, generate the
344 * absolute path.
377 /* count '..' occurrences in target path */
388 /* Calculate resolved path size */
399 /* Set resolved path */
431 * There is no trailling null byte in the symlink's target path, so a
435 /* Get target name (relative path) */
438 /* Relative -> absolute path conversion */
455 char *path, *target, **sym_tokens, *res, *rem;
466 path = NULL;
495 /* No path given -> root directory */
536 path = sqfs_concat_tokens(token_list, j + 1);
537 if (!path) {
542 target = sqfs_resolve_symlink(sym, path);
636 free(path);
886 char **token_list = NULL, *path = NULL;
919 path = strdup(filename);
920 if (!path) {
932 ret = sqfs_tokenize(token_list, token_count, path);
967 free(path);
1125 static char *sqfs_basename(char *path)
1129 fname = path + strlen(path) - 1;
1130 while (fname >= path) {
1142 static char *sqfs_dirname(char *path)
1146 fname = sqfs_basename(path);
1150 return path;
1154 * Takes a path to file and splits it in two parts: the filename itself and the
1155 * directory's path, e.g.:
1156 * path: /path/to/file.txt
1158 * dir: /path/to
1160 static int sqfs_split_path(char **file, char **dir, const char *path)
1173 /* check for first slash in path*/
1174 if (path[0] == '/') {
1175 tmp_path = strdup(path);
1181 tmp_path = malloc(strlen(path) + 2);
1187 strcpy(tmp_path + 1, path);