Bug 2701 - sftp and scp show wrong units for speeds and file sizes in progress meter
Summary: sftp and scp show wrong units for speeds and file sizes in progress meter
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sftp (show other bugs)
Version: 7.4p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-30 22:30 AEDT by Jakub Jelen
Modified: 2017-03-30 22:30 AEDT (History)
0 users

See Also:


Attachments
Proposed patch to use units recommended by IEEE (564 bytes, patch)
2017-03-30 22:30 AEDT, Jakub Jelen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelen 2017-03-30 22:30:27 AEDT
Created attachment 2967 [details]
Proposed patch to use units recommended by IEEE

Reading through IEEE_1541-2002 [1], OpenSSH progress meter code is wrongly using K, M, G, T prefixes as a multiplies of 1024. The data should be divided either by 1000 or the correct prefixes should be used (Ki, Mi, Gi, Ti).

This can be very confusing for users [2] who compare the sizes with other tools presenting sizes in correct format.

[1] https://en.wikipedia.org/wiki/IEEE_1541-2002

[2] http://stackoverflow.com/questions/43115542/scp-transfer-reports-100-complete-and-is-transferred-but-file-size-is-inco