public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "mail@bernhard-voelker.de" <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, 30 Mar 2012 15:34:59 +0200	[thread overview]
Message-ID: <20120330133459.GD23437@x2.net.home> (raw)
In-Reply-To: <1832206888.202754.1332755406928.JavaMail.open-xchange@email.1und1.de>

On Mon, Mar 26, 2012 at 11:50:06AM +0200, mail@bernhard-voelker.de wrote:
> 
> On March 26, 2012 at 11:39 AM "mail@bernhard-voelker.de"
> <mail@bernhard-voelker.de> wrote:
> 
> > * [PATCH 1/2] wipefs: use strtosize() for -o
> 
> 
> oops, sorry, there is an error in that patch.
> It was obviously not so trivial as at seemed to be.
> 
> Here's the correction.
> 
> Berny
> 
> From 531cb1ec623fc5c3ac0e95f897b712517b5b1167 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Mon, 26 Mar 2012 11:48:57 +0200
> Subject: [PATCH] wipefs: use strtosize() for -o
> Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
> ---
> misc-utils/wipefs.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
> diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c
> index 74de3a3..5059c7c 100644
> --- a/misc-utils/wipefs.c
> +++ b/misc-utils/wipefs.c
> @@ -385,6 +385,7 @@ main(int argc, char **argv)
> {
> struct wipe_desc *wp0 = NULL, *wp;
> int c, all = 0, has_offset = 0, noact = 0, mode = 0, quiet = 0;
> + uintmax_t offset;
> 
> static const struct option longopts[] = {
> { "all", 0, 0, 'a' },
> @@ -414,7 +415,10 @@ main(int argc, char **argv)
> noact++;
> break;
> case 'o':
> - wp0 = add_offset(wp0, strtoll_offset(optarg), 1);

 strtoll_offset() uses strtosize() :-)

 Anyway, I'll add strtosize_or_err() to make it more usable in
 argv[] parsers.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2012-03-30 13:35 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
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 [this message]
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=20120330133459.GD23437@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox