Lines Matching +defs:t +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);
165 errx(EXIT_FAILURE, "Can't merge %s `%s' with existing %s",
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);
217 err(EXIT_FAILURE, "Can't opendir `%s'", path);
218 rp = path + strlen(root) + 1;
245 __func__, root, dir, name);
251 err(EXIT_FAILURE, "Can't stat `%s'", path);
254 err(EXIT_FAILURE, "Can't lstat `%s'", path);
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;
454 err(EXIT_FAILURE, "Can't open `%s'", specfile);
456 root = spec(fp);
459 err(EXIT_FAILURE, "Can't close `%s'", specfile);
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);
552 * don't add optional spec entries
560 #define NODETEST(t, m) \
561 if (!(t)) \
634 #define ASEPRINT(t, b, o, n) \
636 printf("\t\t\tchanging %s from " b " to " b "\n", \
637 t, o, n)
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);