search for: 18f76b155

Displaying 1 result from an estimated 1 matches for "18f76b155".

2017 Dec 12
2
[PATCH] df: Handle block sizes smaller than 1024 bytes (RHBZ#1525241).
Thanks: Mykola Ivanets --- df/output.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/df/output.c b/df/output.c index eed7f384d..18f76b155 100644 --- a/df/output.c +++ b/df/output.c @@ -80,6 +80,22 @@ print_title (void) } } +/* scale (n, 4096, 1024) ==> n * 4 + * scale (n, 512, 1024) ==> n / 2 + */ +static uintmax_t +scale (uintmax_t n, uintmax_t from, uintmax_t to) +{ + if (from >= to) { + uintmax_t multiplier = f...