Lines Matching refs:root
69 * build a tree of fsnodes from `root' and `dir', with a parent
70 * fsnode of `parent' (which may be NULL for the root of the tree).
76 walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join)
87 assert(root != NULL);
90 len = snprintf(path, sizeof(path), "%s/%s", root, dir);
97 rp = path + strlen(root) + 1;
124 printf("scanning %s/%s/%s\n", root, dir, name);
155 cur->child = walk_dir(root, rp, cur,
165 cur = create_fsnode(root, dir, name, &stbuf);
182 cur->child = walk_dir(root, rp, cur, NULL);
216 err(1, "Can't closedir `%s/%s'", root, dir);
221 create_fsnode(const char *root, const char *path, const char *name,
230 cur->root = root;
311 NODE *root;
323 root = spec(fp);
329 if (root == NULL)
331 assert(strcmp(root->name, ".") == 0);
332 assert(root->type == F_DIR);
335 apply_specdir(dir, root, parent, speconly);
337 free_nodes(root);
562 dump_fsnodes(fsnode *root)
567 printf("dump_fsnodes: %s %p\n", root->path, root);
568 for (cur = root; cur != NULL; cur = cur->next) {
592 printf("dump_fsnodes: finished %s/%s\n", root->path, root->name);