From: Denys Vlasenko Date: Tue, 6 Apr 2010 21:33:28 +0000 (+0200) Subject: hexdump: make -s 0xNNNNN work X-Git-Tag: 1_17_0~302 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1854bc1aa2081b99490bd60721122d28fc8a6737;p=oweals%2Fbusybox.git hexdump: make -s 0xNNNNN work function old new delta hexdump_main 603 605 +2 Signed-off-by: Denys Vlasenko --- diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index f3878f44f..2eb5e57ae 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c @@ -92,8 +92,8 @@ int hexdump_main(int argc, char **argv) if (ch == 'n') { dumper->dump_length = xatoi_u(optarg); } /* else */ - if (ch == 's') { - dumper->dump_skip = xatoul_range_sfx(optarg, 0, LONG_MAX, suffixes); + if (ch == 's') { /* compat: -s accepts hex numbers too */ + dumper->dump_skip = xstrtoul_range_sfx(optarg, /*base:*/ 0, /*lo:*/ 0, /*hi:*/ LONG_MAX, suffixes); } /* else */ if (ch == 'v') { dumper->dump_vflag = ALL;