Apparently fixed filesystems blocks to bytes ratio
This commit is contained in:
parent
35857e29b4
commit
4fa89f9104
7
src/df.c
7
src/df.c
|
@ -68,11 +68,10 @@ static int _df_mtab(Prefs * prefs)
|
||||||
|
|
||||||
static void _df_print(Prefs * prefs, const struct statvfs * f)
|
static void _df_print(Prefs * prefs, const struct statvfs * f)
|
||||||
{
|
{
|
||||||
int mod;
|
unsigned long long mod;
|
||||||
|
|
||||||
mod = f->f_bsize / ((*prefs & PREFS_k) ? 1024 : 512);
|
mod = f->f_bsize / ((*prefs & PREFS_k) ? 8192 : 4096);
|
||||||
/* FIXME round up "Use%" result */
|
printf("%-11s %10llu %10llu %10llu %7llu%% %s\n", f->f_mntfromname,
|
||||||
printf("%-11s %10lu %10lu %10lu %7lu%% %s\n", f->f_mntfromname ,
|
|
||||||
f->f_blocks * mod, (f->f_blocks - f->f_bfree) * mod,
|
f->f_blocks * mod, (f->f_blocks - f->f_bfree) * mod,
|
||||||
f->f_bavail * mod, ((f->f_blocks - f->f_bfree) * 100)
|
f->f_bavail * mod, ((f->f_blocks - f->f_bfree) * 100)
|
||||||
/ ((f->f_blocks - f->f_bfree) + f->f_bavail),
|
/ ((f->f_blocks - f->f_bfree) + f->f_bavail),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user