aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/find.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/toys/pending/find.c b/toys/pending/find.c
index dddca5f5..d40db184 100644
--- a/toys/pending/find.c
+++ b/toys/pending/find.c
@@ -6,7 +6,7 @@
*
* See http://opengroup.org/onlinepubs/9699919799/utilities/find.html
-USE_LINK(NEWTOY(find, "?", TOYFLAG_USR|TOYFLAG_BIN))
+USE_FIND(NEWTOY(find, "?", TOYFLAG_USR|TOYFLAG_BIN))
config FIND
bool "find"
@@ -667,39 +667,6 @@ void build_filter_list(void)
}
}
-int test_callback(struct dirtree *node)
-{
- char *path;
- int plen;
-
- //printf("%s: ", node->name);
-
- /* skip non-root '.' and all '..' */
- if (node->name[0] == '.' &&
- ((!node->name[1] && node->parent) ||
- (node->name[1]=='.' && !node->name[2]))) {
- //printf("skipping\n");
- return 0;
- }
-
- //printf("\n");
- path = dirtree_path(node, &plen);
- printf("%s\n", path);
- free(path);
- return DIRTREE_RECURSE;
-}
-
-void dt_test(void)
-{
- struct dirtree *root;
-
- printf("testing dirtree routines...\n");
-
- root = dirtree_read(".", test_callback);
- printf("root=%p\n", root);
- exit(0);
-}
-
void find_main(void)
{
int i;
@@ -716,11 +683,6 @@ void find_main(void)
}
}
- /* change if to enalbe dt_test routine */
- if (debug && 0) {
- dt_test();
- }
-
/* parse filters, if present */
/* also, fill toybuf with the directory to start in, if present */
build_filter_list();