free: --si changes base of default output

This commit is contained in:
Jan Rybar 2022-09-28 07:57:03 +00:00 committed by Craig Small
parent f9f5f6ad38
commit 3ea211fab8

View File

@ -123,7 +123,7 @@ static const char *scale_size(unsigned long size, int flags, struct commandline_
switch (args.exponent) { switch (args.exponent) {
case 0: case 0:
/* default output */ /* default output */
snprintf(buf, sizeof(buf), "%ld", size); snprintf(buf, sizeof(buf), "%ld", (long int)(bytes / (long long int)base));
return buf; return buf;
case 1: case 1:
/* in bytes, which can not be in SI */ /* in bytes, which can not be in SI */