diff options
| author | Ron Yorston <rmy@pobox.com> | 2024-10-08 11:54:51 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2024-10-08 12:09:30 +0100 |
| commit | ded78ca2656fd41f130d65345b0eb4d39b1fcbdf (patch) | |
| tree | ec6a2dfab77f2a49a9629d29df371a3d93256929 /util-linux | |
| parent | 054f494916093715bc1d2d25a7a452a036d41add (diff) | |
| parent | 75ca8d074bacb6896d770993b93161c40aa31b9f (diff) | |
| download | busybox-w32-ded78ca2656fd41f130d65345b0eb4d39b1fcbdf.tar.gz busybox-w32-ded78ca2656fd41f130d65345b0eb4d39b1fcbdf.tar.bz2 busybox-w32-ded78ca2656fd41f130d65345b0eb4d39b1fcbdf.zip | |
Merge branch 'busybox' into merge
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/hexdump.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index c46ffeca7..5a938e783 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c | |||
| @@ -127,15 +127,20 @@ int hexdump_main(int argc, char **argv) | |||
| 127 | if (ch == 'f') { | 127 | if (ch == 'f') { |
| 128 | bb_dump_addfile(dumper, optarg); | 128 | bb_dump_addfile(dumper, optarg); |
| 129 | } /* else */ | 129 | } /* else */ |
| 130 | if (ch == 'n') { | 130 | if (ch == 'n') { /* compat: -n accepts hex numbers too */ |
| 131 | dumper->dump_length = xatoi_positive(optarg); | 131 | dumper->dump_length = xstrtou_range_sfx( |
| 132 | optarg, | ||
| 133 | /*base:*/ 0, | ||
| 134 | /*lo:*/ 0, /*hi:*/ INT_MAX, | ||
| 135 | kmg_i_suffixes | ||
| 136 | ); | ||
| 132 | } /* else */ | 137 | } /* else */ |
| 133 | if (ch == 's') { /* compat: -s accepts hex numbers too */ | 138 | if (ch == 's') { /* compat: -s accepts hex numbers too */ |
| 134 | dumper->dump_skip = xstrtoull_range_sfx( | 139 | dumper->dump_skip = xstrtoull_range_sfx( |
| 135 | optarg, | 140 | optarg, |
| 136 | /*base:*/ 0, | 141 | /*base:*/ 0, |
| 137 | /*lo:*/ 0, /*hi:*/ OFF_T_MAX, | 142 | /*lo:*/ 0, /*hi:*/ OFF_T_MAX, |
| 138 | bkm_suffixes | 143 | kmg_i_suffixes |
| 139 | ); | 144 | ); |
| 140 | } /* else */ | 145 | } /* else */ |
| 141 | if (ch == 'v') { | 146 | if (ch == 'v') { |
