diff options
author | Ron Yorston <rmy@pobox.com> | 2013-08-27 16:10:53 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2013-08-27 16:10:53 +0100 |
commit | 3fd34651ea72ea1c335d3170f234cb0517fd897f (patch) | |
tree | 36e8fc40cffd464ffda4759020777dd3ca23ca31 /coreutils/od_bloaty.c | |
parent | e3ac39098326de084a805d0dd31db9666b734f20 (diff) | |
parent | d6ae4fb446daedfe3073d67be655942e9fa7eb18 (diff) | |
download | busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.tar.gz busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.tar.bz2 busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'coreutils/od_bloaty.c')
-rw-r--r-- | coreutils/od_bloaty.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index ee4f72ca1..c4d11601f 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c | |||
@@ -1173,12 +1173,6 @@ parse_old_offset(const char *s, off_t *offset) | |||
1173 | int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1173 | int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1174 | int od_main(int argc UNUSED_PARAM, char **argv) | 1174 | int od_main(int argc UNUSED_PARAM, char **argv) |
1175 | { | 1175 | { |
1176 | static const struct suffix_mult bkm[] = { | ||
1177 | { "b", 512 }, | ||
1178 | { "k", 1024 }, | ||
1179 | { "m", 1024*1024 }, | ||
1180 | { "", 0 } | ||
1181 | }; | ||
1182 | #if ENABLE_LONG_OPTS | 1176 | #if ENABLE_LONG_OPTS |
1183 | static const char od_longopts[] ALIGN1 = | 1177 | static const char od_longopts[] ALIGN1 = |
1184 | "skip-bytes\0" Required_argument "j" | 1178 | "skip-bytes\0" Required_argument "j" |
@@ -1237,7 +1231,7 @@ int od_main(int argc UNUSED_PARAM, char **argv) | |||
1237 | address_pad_len_char = doxn_address_pad_len_char[pos]; | 1231 | address_pad_len_char = doxn_address_pad_len_char[pos]; |
1238 | } | 1232 | } |
1239 | if (opt & OPT_N) { | 1233 | if (opt & OPT_N) { |
1240 | max_bytes_to_format = xstrtooff_sfx(str_N, 0, bkm); | 1234 | max_bytes_to_format = xstrtooff_sfx(str_N, 0, bkm_suffixes); |
1241 | } | 1235 | } |
1242 | if (opt & OPT_a) decode_format_string("a"); | 1236 | if (opt & OPT_a) decode_format_string("a"); |
1243 | if (opt & OPT_b) decode_format_string("oC"); | 1237 | if (opt & OPT_b) decode_format_string("oC"); |
@@ -1246,7 +1240,7 @@ int od_main(int argc UNUSED_PARAM, char **argv) | |||
1246 | if (opt & OPT_f) decode_format_string("fF"); | 1240 | if (opt & OPT_f) decode_format_string("fF"); |
1247 | if (opt & OPT_h) decode_format_string("x2"); | 1241 | if (opt & OPT_h) decode_format_string("x2"); |
1248 | if (opt & OPT_i) decode_format_string("d2"); | 1242 | if (opt & OPT_i) decode_format_string("d2"); |
1249 | if (opt & OPT_j) n_bytes_to_skip = xstrtooff_sfx(str_j, 0, bkm); | 1243 | if (opt & OPT_j) n_bytes_to_skip = xstrtooff_sfx(str_j, 0, bkm_suffixes); |
1250 | if (opt & OPT_l) decode_format_string("d4"); | 1244 | if (opt & OPT_l) decode_format_string("d4"); |
1251 | if (opt & OPT_o) decode_format_string("o2"); | 1245 | if (opt & OPT_o) decode_format_string("o2"); |
1252 | while (lst_t) { | 1246 | while (lst_t) { |
@@ -1255,7 +1249,7 @@ int od_main(int argc UNUSED_PARAM, char **argv) | |||
1255 | if (opt & OPT_x) decode_format_string("x2"); | 1249 | if (opt & OPT_x) decode_format_string("x2"); |
1256 | if (opt & OPT_s) decode_format_string("d2"); | 1250 | if (opt & OPT_s) decode_format_string("d2"); |
1257 | if (opt & OPT_S) { | 1251 | if (opt & OPT_S) { |
1258 | string_min = xstrtou_sfx(str_S, 0, bkm); | 1252 | string_min = xstrtou_sfx(str_S, 0, bkm_suffixes); |
1259 | } | 1253 | } |
1260 | 1254 | ||
1261 | // Bloat: | 1255 | // Bloat: |