Lines Matching defs:root
91 fsnode_sort(fsnode *first, const char *root, const char *dir)
99 __func__, root, dir, tmp->name);
117 __func__, root, dir, tmp->name);
190 * build a tree of fsnodes from `root' and `dir', with a parent
191 * fsnode of `parent' (which may be NULL for the root of the tree).
197 walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join,
208 assert(root != NULL);
211 len = snprintf(path, sizeof(path), "%s/%s", root, dir);
218 rp = path + strlen(root) + 1;
245 __func__, root, dir, name);
279 cur->child = walk_dir(root, rp, cur,
295 cur = create_fsnode(root, dir, name, &stbuf);
312 cur->child = walk_dir(root, rp, cur, NULL,
348 err(EXIT_FAILURE, "Can't closedir `%s/%s'", root, dir);
350 return fsnode_sort(first, root, dir);
354 create_fsnode(const char *root, const char *path, const char *name,
363 cur->root = root;
444 NODE *root;
456 root = spec(fp);
462 if (root == NULL)
465 assert(strcmp(root->name, ".") == 0);
466 assert(root->type == F_DIR);
469 apply_specdir(dir, root, parent, speconly);
471 free_nodes(root);
707 dump_fsnodes(fsnode *root)
712 printf("%s: %s %p\n", __func__, root->path, root);
713 for (cur = root; cur != NULL; cur = cur->next) {
737 printf("%s: finished %s/%s\n", __func__, root->path, root->name);