aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-03-19 11:23:24 -0500
committerRob Landley <rob@landley.net>2018-03-19 11:23:24 -0500
commitaa265ebff4fd94b1bfa152a116d6d5fa1971b727 (patch)
tree05cc0a32508602e0946b0371c3b60a3bd45d9596 /toys
parent19a042b71f357ef2dbfa8002bc9c44d634f86af8 (diff)
downloadtoybox-aa265ebff4fd94b1bfa152a116d6d5fa1971b727.tar.gz
Ryan Prichard pointed out that du -d0 should act like du -s, but the plumbing
wouldn't let him assign a negative default value, so I fixed it.
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/du.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/du.c b/toys/posix/du.c
index 0d9a676d..e315d3a3 100644
--- a/toys/posix/du.c
+++ b/toys/posix/du.c
@@ -6,7 +6,7 @@
*
* TODO: cleanup
-USE_DU(NEWTOY(du, "d#<0hmlcaHkKLsx[-HL][-kKmh]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_DU(NEWTOY(du, "d#<0=-1hmlcaHkKLsx[-HL][-kKmh]", TOYFLAG_USR|TOYFLAG_BIN))
config DU
bool "du"
@@ -54,7 +54,7 @@ static void print(long long size, struct dirtree *node)
{
char *name = "total";
- if (TT.maxdepth && TT.depth > TT.maxdepth) return;
+ if (TT.depth > TT.maxdepth) return;
if (toys.optflags & FLAG_h) {
human_readable(toybuf, size, 0);