diff --git a/lib/compat.c b/lib/compat.c index 02527dbd..a36cebd9 100644 --- a/lib/compat.c +++ b/lib/compat.c @@ -206,8 +206,8 @@ char *do_big_num(int64 num, int human_flag, const char *fract) break; } - snprintf(bufs[n], sizeof bufs[0], "%.*f%c", precision, - (double) num / powi, *units); + snprintf(bufs[n], sizeof bufs[0], "%.*f%c%s", precision, + (double) num / powi, *units, num > mult && mult == 1024 ? "i" : ""); return bufs[n]; } diff --git a/rsync.1.md b/rsync.1.md index a593c1cd..fbdfd480 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -3312,6 +3312,8 @@ expand it. (mega), `G` (giga), `T` (tera), `P` (peta), `E` (exa), `Z` (zetta) or `Y` (yotta). For example, a 1234567-byte file would output as 1.23M in level-2 (assuming that a period is your local decimal point). + Additionally an `i` is appended in level-3 to indicate the binary base. + The same file would output as 1.17Mi in level-3. Backward compatibility note: versions of rsync prior to 3.1.0 do not support human-readable level 1, and they default to level 0. Thus,