From af2a6ba96b7e7dce325159f414452dcfcc6e2452 Mon Sep 17 00:00:00 2001 From: Xiaole He Date: Wed, 5 Nov 2025 17:38:19 +0800 Subject: [PATCH] Fix incorrect unit prefix examples in manpage 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 --- fio.1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fio.1 b/fio.1 index 9c4ff08c86..20ba713070 100644 --- a/fio.1 +++ b/fio.1 @@ -311,15 +311,15 @@ Examples with `kb_base=1000': .RS .P .PD 0 -4 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB +4 KiB: 4096, 4096b, 4096B, 4ki, 4kib, 4kiB, 4Ki, 4KiB .P -1 MiB: 1048576, 1m, 1024k +1 MiB: 1048576, 1mi, 1024ki .P -1 MB: 1000000, 1mi, 1000ki +1 MB: 1000000, 1m, 1000k .P -1 TiB: 1073741824, 1t, 1024m, 1048576k +1 TiB: 1099511627776, 1ti, 1024gi, 1048576mi .P -1 TB: 1000000000, 1ti, 1000mi, 1000000ki +1 TB: 1000000000000, 1t, 1000g, 1000000m .PD .RE .P @@ -333,9 +333,9 @@ Examples with `kb_base=1024' (default): .P 1 MB: 1000000, 1mi, 1000ki .P -1 TiB: 1073741824, 1t, 1024m, 1048576k +1 TiB: 1099511627776, 1t, 1024g, 1048576m .P -1 TB: 1000000000, 1ti, 1000mi, 1000000ki +1 TB: 1000000000000, 1ti, 1000gi, 1000000mi .PD .RE .P