diff options
| author | Rob Landley <rob@landley.net> | 2021-02-16 10:44:14 -0600 | 
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2021-02-16 10:44:55 -0600 | 
| commit | b26587fb956c4145d67518ea295cd058ef21c4f9 (patch) | |
| tree | f0d399ccb8bc5107bfff18ca209141bbe37ccc94 | |
| parent | 4d3bf8b61e2158856572ca927cd831b9461a03a4 (diff) | |
| download | toybox-b26587fb956c4145d67518ea295cd058ef21c4f9.tar.gz | |
Only error once for each "df nonexistent"
| -rw-r--r-- | toys/posix/df.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/toys/posix/df.c b/toys/posix/df.c index 7f43a109..0201315e 100644 --- a/toys/posix/df.c +++ b/toys/posix/df.c @@ -155,8 +155,9 @@ void df_main(void)          struct stat st;          // Stat it (complain if we can't). -        if (stat(*next, &st)) perror_msg("'%s'", *next); -        else { +        if (stat(*next, &st)) { +          if (!measuring) perror_msg("'%s'", *next); +        } else {            // Find and display this filesystem.  Use _last_ hit in case of            // overmounts (which is first hit in the reversed list).            for (mt = mtend; mt; mt = mt->prev)  | 
