aboutsummaryrefslogtreecommitdiff
path: root/coreutils/od_bloaty.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/od_bloaty.c')
-rw-r--r--coreutils/od_bloaty.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index b408a8477..2c26dda16 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -1166,12 +1166,6 @@ parse_old_offset(const char *s, off_t *offset)
1166int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 1166int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
1167int od_main(int argc UNUSED_PARAM, char **argv) 1167int od_main(int argc UNUSED_PARAM, char **argv)
1168{ 1168{
1169 static const struct suffix_mult bkm[] = {
1170 { "b", 512 },
1171 { "k", 1024 },
1172 { "m", 1024*1024 },
1173 { "", 0 }
1174 };
1175#if ENABLE_LONG_OPTS 1169#if ENABLE_LONG_OPTS
1176 static const char od_longopts[] ALIGN1 = 1170 static const char od_longopts[] ALIGN1 =
1177 "skip-bytes\0" Required_argument "j" 1171 "skip-bytes\0" Required_argument "j"
@@ -1230,7 +1224,7 @@ int od_main(int argc UNUSED_PARAM, char **argv)
1230 address_pad_len_char = doxn_address_pad_len_char[pos]; 1224 address_pad_len_char = doxn_address_pad_len_char[pos];
1231 } 1225 }
1232 if (opt & OPT_N) { 1226 if (opt & OPT_N) {
1233 max_bytes_to_format = xstrtooff_sfx(str_N, 0, bkm); 1227 max_bytes_to_format = xstrtooff_sfx(str_N, 0, bkm_suffixes);
1234 } 1228 }
1235 if (opt & OPT_a) decode_format_string("a"); 1229 if (opt & OPT_a) decode_format_string("a");
1236 if (opt & OPT_b) decode_format_string("oC"); 1230 if (opt & OPT_b) decode_format_string("oC");
@@ -1239,7 +1233,7 @@ int od_main(int argc UNUSED_PARAM, char **argv)
1239 if (opt & OPT_f) decode_format_string("fF"); 1233 if (opt & OPT_f) decode_format_string("fF");
1240 if (opt & OPT_h) decode_format_string("x2"); 1234 if (opt & OPT_h) decode_format_string("x2");
1241 if (opt & OPT_i) decode_format_string("d2"); 1235 if (opt & OPT_i) decode_format_string("d2");
1242 if (opt & OPT_j) n_bytes_to_skip = xstrtooff_sfx(str_j, 0, bkm); 1236 if (opt & OPT_j) n_bytes_to_skip = xstrtooff_sfx(str_j, 0, bkm_suffixes);
1243 if (opt & OPT_l) decode_format_string("d4"); 1237 if (opt & OPT_l) decode_format_string("d4");
1244 if (opt & OPT_o) decode_format_string("o2"); 1238 if (opt & OPT_o) decode_format_string("o2");
1245 while (lst_t) { 1239 while (lst_t) {
@@ -1248,7 +1242,7 @@ int od_main(int argc UNUSED_PARAM, char **argv)
1248 if (opt & OPT_x) decode_format_string("x2"); 1242 if (opt & OPT_x) decode_format_string("x2");
1249 if (opt & OPT_s) decode_format_string("d2"); 1243 if (opt & OPT_s) decode_format_string("d2");
1250 if (opt & OPT_S) { 1244 if (opt & OPT_S) {
1251 string_min = xstrtou_sfx(str_S, 0, bkm); 1245 string_min = xstrtou_sfx(str_S, 0, bkm_suffixes);
1252 } 1246 }
1253 1247
1254 // Bloat: 1248 // Bloat: