/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <stdio.h>
-#include <string.h>
#include <sys/statvfs.h>
#include "../util.h"
return NULL;
}
- return fmt_scaled(fs.f_frsize * fs.f_bavail);
+ return fmt_human(fs.f_frsize * fs.f_bavail, 1024);
}
const char *
return NULL;
}
- return bprintf("%d%%", (int)(100 *
+ return bprintf("%d", (int)(100 *
(1.0f - ((float)fs.f_bavail / (float)fs.f_blocks))));
}
return NULL;
}
- return fmt_scaled(fs.f_frsize * fs.f_blocks);
+ return fmt_human(fs.f_frsize * fs.f_blocks, 1024);
}
const char *
return NULL;
}
- return fmt_scaled(fs.f_frsize * (fs.f_blocks - fs.f_bfree));
+ return fmt_human(fs.f_frsize * (fs.f_blocks - fs.f_bfree), 1024);
}