Fix incorrect unit prefix examples in manpage#2011
Open
hexiaole1994 wants to merge 1 commit intoaxboe:masterfrom
Open
Fix incorrect unit prefix examples in manpage#2011hexiaole1994 wants to merge 1 commit intoaxboe:masterfrom
hexiaole1994 wants to merge 1 commit intoaxboe:masterfrom
Conversation
The examples in the manpage for kb_base=1000 and kb_base=1024 had multiple errors in unit prefixes and values: For kb_base=1000 (IEC/SI standard mode): - Fix 4 KiB example: use IEC prefix 'ki' instead of 'k' (4k -> 4ki to correctly represent 4096 bytes) - Fix 1 MiB example: use IEC prefix 'mi' instead of 'm' (1m -> 1mi to correctly represent 1048576 bytes) - Fix 1 MB example: use SI prefix 'm' instead of 'mi' (1mi -> 1m to correctly represent 1000000 bytes) - Fix 1 TiB example: use IEC prefix 'ti' instead of 't' (1t -> 1ti to correctly represent 1099511627776 bytes) - Fix 1 TiB value: 1073741824 -> 1099511627776 - Fix 1 TB example: use SI prefix 't' instead of 'ti' (1ti -> 1t to correctly represent 1000000000000 bytes) - Fix 1 TB value: 1000000000 -> 1000000000000 - Fix 1 TB prefixes: 1000mi -> 1000g, 1000000ki -> 1000000m For kb_base=1024 (compatibility mode): - Fix 1 TiB value: 1073741824 -> 1099511627776 - Fix 1 TiB prefixes: 1024m -> 1024g, 1048576k -> 1048576m (to correctly represent 1099511627776 bytes) - Fix 1 TB value: 1000000000 -> 1000000000000 - Fix 1 TB prefixes: 1000mi -> 1000gi, 1000000ki -> 1000000mi (to correctly represent 1000000000000 bytes) All examples now correctly match the actual behavior implemented in parse.c. Signed-off-by: Xiaole He <hexiaole1994@126.com>
Collaborator
|
I myself use So care needs to be taken if we are going to update that section. Due to the previous point I don't know if the HOWTO would need updating too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The examples in the manpage for kb_base=1000 and kb_base=1024 had multiple errors in unit prefixes and values:
For kb_base=1000 (IEC/SI standard mode):
For kb_base=1024 (compatibility mode):
All examples now correctly match the actual behavior implemented in parse.c.
Fixes #1618
Related PR #1827