diff options
-rw-r--r-- | scripts/mkflags.c | 1 | ||||
-rw-r--r-- | toys/posix/du.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/mkflags.c b/scripts/mkflags.c index e0e833ce..c96f7f55 100644 --- a/scripts/mkflags.c +++ b/scripts/mkflags.c @@ -110,6 +110,7 @@ struct flag *digest(char *string) if (strchr("?&^-:#|@*; ", *string)) string++; else if (strchr("=<>", *string)) { + if (string[1]=='-') string++; if (!isdigit(string[1])) { fprintf(stderr, "%c without number in '%s'", *string, err); exit(1); 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); |