diff options
author | Ron Yorston <rmy@pobox.com> | 2015-03-23 13:56:37 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-03-23 13:56:37 +0000 |
commit | 486a3907f353adeb7f3ced5357db1e604659b785 (patch) | |
tree | 5033870835b2b9d5b26ba1f4544943c47893b904 /libbb | |
parent | 74ba8c760f3337218cddabaaa0acc4e1f5d6e6c5 (diff) | |
parent | 1850d5ec0e90fbfb598ed7ad8ff0a63b6e5692ce (diff) | |
download | busybox-w32-486a3907f353adeb7f3ced5357db1e604659b785.tar.gz busybox-w32-486a3907f353adeb7f3ced5357db1e604659b785.tar.bz2 busybox-w32-486a3907f353adeb7f3ced5357db1e604659b785.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xatonum.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libbb/xatonum.c b/libbb/xatonum.c index 6f4e023bb..9dd5c3e7e 100644 --- a/libbb/xatonum.c +++ b/libbb/xatonum.c | |||
@@ -75,3 +75,24 @@ const struct suffix_mult bkm_suffixes[] = { | |||
75 | { "m", 1024*1024 }, | 75 | { "m", 1024*1024 }, |
76 | { "", 0 } | 76 | { "", 0 } |
77 | }; | 77 | }; |
78 | |||
79 | const struct suffix_mult cwbkMG_suffixes[] = { | ||
80 | { "c", 1 }, | ||
81 | { "w", 2 }, | ||
82 | { "b", 512 }, | ||
83 | { "kB", 1000 }, | ||
84 | { "kD", 1000 }, | ||
85 | { "k", 1024 }, | ||
86 | { "KB", 1000 }, /* compat with coreutils dd */ | ||
87 | { "KD", 1000 }, /* compat with coreutils dd */ | ||
88 | { "K", 1024 }, /* compat with coreutils dd */ | ||
89 | { "MB", 1000000 }, | ||
90 | { "MD", 1000000 }, | ||
91 | { "M", 1024*1024 }, | ||
92 | { "GB", 1000000000 }, | ||
93 | { "GD", 1000000000 }, | ||
94 | { "G", 1024*1024*1024 }, | ||
95 | /* "D" suffix for decimal is not in coreutils manpage, looks like it's deprecated */ | ||
96 | /* coreutils also understands TPEZY suffixes for tera- and so on, with B suffix for decimal */ | ||
97 | { "", 0 } | ||
98 | }; | ||