Lines Matching defs:root
65 * build a tree of fsnodes from `root' and `dir', with a parent
66 * fsnode of `parent' (which may be NULL for the root of the tree).
72 walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join)
83 assert(root != NULL);
86 len = snprintf(path, sizeof(path), "%s/%s", root, dir);
93 rp = path + strlen(root) + 1;
120 printf("scanning %s/%s/%s\n", root, dir, name);
151 cur->child = walk_dir(root, rp, cur,
161 cur = create_fsnode(root, dir, name, &stbuf);
178 cur->child = walk_dir(root, rp, cur, NULL);
212 err(1, "Can't closedir `%s/%s'", root, dir);
217 create_fsnode(const char *root, const char *path, const char *name,
226 cur->root = root;
307 NODE *root;
319 root = spec(fp);
325 if (root == NULL)
327 assert(strcmp(root->name, ".") == 0);
328 assert(root->type == F_DIR);
331 apply_specdir(dir, root, parent, speconly);
333 free_nodes(root);
558 dump_fsnodes(fsnode *root)
563 printf("dump_fsnodes: %s %p\n", root->path, root);
564 for (cur = root; cur != NULL; cur = cur->next) {
588 printf("dump_fsnodes: finished %s/%s\n", root->path, root->name);