ubase

suckless linux base utils
git clone git://git.suckless.org/ubase
Log | Files | Refs | README | LICENSE

commit ac4fcddd50aba673e38563a69b7a8e5a20ef28e8
parent 4c33cf2a98312a2947c365f7cfbff29615efe2a5
Author: sin <sin@2f30.org>
Date:   Tue, 16 Feb 2016 15:19:25 +0000

df: Don't scream if statvfs() fails

Diffstat:
Mdf.c | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/df.c b/df.c @@ -60,10 +60,8 @@ mnt_show(const char *fsname, const char *dir) int capacity = 0; int bs; - if (statvfs(dir, &s) < 0) { - weprintf("statvfs %s:", dir); + if (statvfs(dir, &s) < 0) return -1; - } bs = s.f_frsize / blksize; total = s.f_blocks * bs; @@ -138,4 +136,4 @@ main(int argc, char *argv[]) endmntent(fp); return ret; -} -\ No newline at end of file +}