From: Karel Zak <kzak@redhat.com>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Cc: Simon de Vlieger <simon@ikanobori.jp>,
"util-linux@vger.kernel.org" <util-linux@vger.kernel.org>
Subject: Re: [PATCH] hexdump: adjust -s and -n option in the man page [was: hexsyntax.c using strtol on the offset parameter]
Date: Fri, 23 Mar 2012 18:19:36 +0100 [thread overview]
Message-ID: <20120323171936.GH2040@x2.net.home> (raw)
In-Reply-To: <4F6B13F9.4020108@bernhard-voelker.de>
On Thu, Mar 22, 2012 at 12:58:49PM +0100, Bernhard Voelker wrote:
> Karel Zak wrote:
>
> > Fixed. The code (as well as -n) was stupid. Now it supports all
> > possible suffixes (K,M,G,T,P,E,Y,Z) and the number is parsed as
> > uintmax_t.
>
> btw: it should read "...P,E,Z,Y", as Y>Z.
>
> The man page is outdated now:
>
> -n length
> Interpret only length bytes of input.
> ...
> -s offset
> Skip offset bytes from the beginning of the input. By default,
> offset is interpreted as a decimal number. With a leading 0x or
> 0X, offset is interpreted as a hexadecimal number, otherwise,
> with a leading 0, offset is interpreted as an octal number.
> Appending the character b, k, or m to offset causes it to be
> interpreted as a multiple of 512, 1024, or 1048576, respec-
> tively.
>
> The variant with 0x or 0X doesn't seem to work anyway:
>
> $ echo 123456789abcdefghijk > /tmp/x
> $ text-utils/hexdump -s 0x1 -n 1 -c /tmp/x
> 0000001 2
> 0000002
offset addressed by 0x works for me:
./text-utils/hexdump -s 0x1fe -n 2 /dev/sda
00001fe aa55
0000200
> From f546c9d7bdd52b2e57761c2c97a701e662d89bc1 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Thu, 22 Mar 2012 12:53:06 +0100
> Subject: [PATCH] hexdump: adjust -s and -n option in the man page
Good point, I have copied the text we already have in the losetup man
page.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2012-03-23 17:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 11:58 [PATCH] hexdump: adjust -s and -n option in the man page [was: hexsyntax.c using strtol on the offset parameter] Bernhard Voelker
2012-03-23 17:19 ` Karel Zak [this message]
2012-03-26 7:20 ` mail
2012-03-26 8:41 ` Karel Zak
2012-03-26 9:39 ` mail
2012-03-26 9:50 ` mail
2012-03-30 13:34 ` Karel Zak
2012-03-30 13:26 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120323171936.GH2040@x2.net.home \
--to=kzak@redhat.com \
--cc=mail@bernhard-voelker.de \
--cc=simon@ikanobori.jp \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.