Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-05-25 20:51:37 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2023-05-25 20:51:37 +0300
commitce4cfc33cade63513963f9d5e701f305cbdfe693 (patch)
treea0ab6bee9f3fb99c1c30e632fe25cb75fd359683 /coreutils
parente2287f99fe6f21fd6435ad04340170ad4ba5f6b3 (diff)
od: correct -i, enable tests which pass for DESKTOP too
function old new delta .rodata 105302 105305 +3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/od.c2
-rw-r--r--coreutils/od_bloaty.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/coreutils/od.c b/coreutils/od.c
index 6d562ea91..bd82487e5 100644
--- a/coreutils/od.c
+++ b/coreutils/od.c
@@ -167,6 +167,8 @@ static const char *const add_strings[] ALIGN_PTR = {
"4/4 \"%15.7e \" \"\\n\"", /* 7: f */
"4/4 \"%08x \" \"\\n\"", /* 8: H, X */
"8/2 \"%04x \" \"\\n\"", /* 9: h, x */
+ /* This probably also depends on word width of the arch (what is "long"?) */
+ /* should be "2/8" or "4/4" depending on sizeof(long)? */
"2/8 \"%20lld \" \"\\n\"", /* 10: I, L, l */
"4/4 \"%11d \" \"\\n\"", /* 11: i */
"4/4 \"%011o \" \"\\n\"", /* 12: O */
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index 5b5e56a21..51fff436b 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -1245,9 +1245,11 @@ int od_main(int argc UNUSED_PARAM, char **argv)
if (opt & OPT_d) decode_format_string("u2");
if (opt & OPT_f) decode_format_string("fF");
if (opt & OPT_h) decode_format_string("x2");
- if (opt & OPT_i) decode_format_string("d2");
+ if (opt & OPT_i) decode_format_string("dI");
if (opt & OPT_j) n_bytes_to_skip = xstrtooff_sfx(str_j, 0, bkm_suffixes);
- if (opt & OPT_l) decode_format_string("d4");
+ /* This probably also depends on word width of the arch (what is "long"?) */
+ /* should be "d4" or "d8" depending on sizeof(long)? */
+ if (opt & OPT_l) decode_format_string("d8");
if (opt & OPT_o) decode_format_string("o2");
while (lst_t) {
decode_format_string(llist_pop(&lst_t));