Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

df: fix "Size" header for multiples of 1000 & 1024 #3499

Conversation

cakebaker
Copy link
Contributor

This PR fixes an issue with the "Size" header for block sizes that are multiples of both 1000 and 1024. So far, such block sizes were handled as multiples of 1024 with the corresponding suffixes (e.g. "K", "M", "G"). Now they are handled as multiples of 1000 with suffixes like "kB", "MB", and "GB", in the same way as is done by GNU df.

Example: 128_000 now becomes 128kB instead of 125K.

@tertsdiepraam
Copy link
Member

@jfinkels Feel free to merge these PRs if you think they're good!

@tertsdiepraam tertsdiepraam merged commit 275f938 into uutils:main May 7, 2022
@cakebaker cakebaker deleted the fix_size_header_for_multiples_of_1000_and_1024 branch May 7, 2022 11:08
@jfinkels
Copy link
Collaborator

jfinkels commented May 8, 2022

I'll consider that in the future, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants