diff options
author | Rob Landley <rob@landley.net> | 2013-03-13 00:34:56 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-03-13 00:34:56 -0500 |
commit | db12a37a97df8f0098e99f50f49a97175861ff28 (patch) | |
tree | 2c26630e5c8c7380eca3fceb2b5a8ca043c93dbe /toys/pending/find.c | |
parent | 55da839b38780fd0ebc637c34c06c2d7eb284fa5 (diff) | |
download | toybox-db12a37a97df8f0098e99f50f49a97175861ff28.tar.gz |
A couple quick fixes to find so I can try it out.
Diffstat (limited to 'toys/pending/find.c')
-rw-r--r-- | toys/pending/find.c | 40 |
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(); |