diff options
author | Rob Landley <rob@landley.net> | 2015-05-09 18:11:22 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-05-09 18:11:22 -0500 |
commit | aab9164df395a4b0878b0ad930a5ec8a806a58e9 (patch) | |
tree | ae36c520e5ebeaf616755792f67c9e09ff1bbf9f /toys/posix/ls.c | |
parent | a913d92bad6550e005a3ffac71a82586042171b5 (diff) | |
download | toybox-aab9164df395a4b0878b0ad930a5ec8a806a58e9.tar.gz |
Add DIRTREE_SHUTUP to disable dirtree warnings if file vanishes out from
under traversal. Pass through full flag set in dirtree_add_node(), add
dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot
of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
Diffstat (limited to 'toys/posix/ls.c')
-rw-r--r-- | toys/posix/ls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c index 5dd6bc50..3e5d3910 100644 --- a/toys/posix/ls.c +++ b/toys/posix/ls.c @@ -540,10 +540,10 @@ void ls_main(void) // Iterate through command line arguments, collecting directories and files. // Non-absolute paths are relative to current directory. - TT.files = dirtree_add_node(0, 0, 0); + TT.files = dirtree_start(0, 0); for (s = *toys.optargs ? toys.optargs : noargs; *s; s++) { - dt = dirtree_add_node(0, *s, !(toys.optflags & (FLAG_l|FLAG_d|FLAG_F)) - || (toys.optflags & (FLAG_L|FLAG_H))); + dt = dirtree_start(*s, !(toys.optflags&(FLAG_l|FLAG_d|FLAG_F)) || + (toys.optflags&(FLAG_L|FLAG_H))); if (!dt) { toys.exitval = 1; |