df: Don't scream if statvfs() fails

This commit is contained in:
sin 2016-02-16 15:19:25 +00:00
parent 4c33cf2a98
commit ac4fcddd50
1 changed files with 2 additions and 4 deletions

4
df.c
View File

@ -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;