mirror of
git://git.suckless.org/ubase
synced 2024-12-17 20:24:45 +00:00
df: Don't scream if statvfs() fails
This commit is contained in:
parent
4c33cf2a98
commit
ac4fcddd50
6
df.c
6
df.c
@ -60,10 +60,8 @@ mnt_show(const char *fsname, const char *dir)
|
|||||||
int capacity = 0;
|
int capacity = 0;
|
||||||
int bs;
|
int bs;
|
||||||
|
|
||||||
if (statvfs(dir, &s) < 0) {
|
if (statvfs(dir, &s) < 0)
|
||||||
weprintf("statvfs %s:", dir);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
bs = s.f_frsize / blksize;
|
bs = s.f_frsize / blksize;
|
||||||
total = s.f_blocks * bs;
|
total = s.f_blocks * bs;
|
||||||
@ -138,4 +136,4 @@ main(int argc, char *argv[])
|
|||||||
endmntent(fp);
|
endmntent(fp);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user