aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/ls.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2023-01-23 09:36:10 -0600
committerRob Landley <rob@landley.net>2023-01-23 09:36:10 -0600
commit733e7b58aadbaad83ecd61e2f4d8f971ad3f235d (patch)
tree9b2398c515ac7be6759ccdb680cf83ebca6d1e65 /toys/posix/ls.c
parentc23b3ff44948416d67ff30f38116bed3b2efb6e5 (diff)
downloadtoybox-733e7b58aadbaad83ecd61e2f4d8f971ad3f235d.tar.gz
Implement DIRTREE_BREADTH.
Diffstat (limited to 'toys/posix/ls.c')
-rw-r--r--toys/posix/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c
index 6e100963..aa722cbb 100644
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -290,7 +290,7 @@ static void listfiles(int dirfd, struct dirtree *indir)
if (toys.optflags == (FLAG_1|FLAG_f)) return;
// Read directory contents. We dup() the fd because this will close it.
// This reads/saves contents to display later, except for in "ls -1f" mode.
- } else dirtree_recurse(indir, filter, dup(dirfd),
+ } else dirtree_recurse(indir, filter, dirfd,
DIRTREE_STATLESS|DIRTREE_SYMFOLLOW*!!FLAG(L));
// Copy linked list to array and sort it. Directories go in array because