From: Jaromir Capik <jcapik@redhat.com>
To: Karel Zak <kzak@redhat.com>
Cc: kerolasa@gmail.com, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] fdformat: Add new switches -f/--from, -t/--to, -r/--repair
Date: Mon, 28 Jul 2014 12:01:11 -0400 (EDT) [thread overview]
Message-ID: <54850462.25033124.1406563271629.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20140728151034.GM8533@x2.net.home>
Ahoj Karle.
> > > > + if ((unsigned int)track_from > param.track - 1)
> > > > + err(EXIT_FAILURE, _("'from' is out of allowed range\n"));
> > > > + if ((unsigned int)track_to > param.track - 1)
> > > > + err(EXIT_FAILURE, _("'to' is out of allowed range\n"));
> > > > + if (track_from > track_to)
> > > > + err(EXIT_FAILURE, _("'from' is higher than 'to'\n"));
> > >
> > > The err() adds new line to print out, so the messages above will print
> > > unexpected empty line.
> >
> > This can be completely removed after the change to strtou32_or_err(),
> > right?
>
> I guess you still want to check user's input against the hardware, so check
> if track_to is smaller than param.track is correct thing. Right?
The comparison with the param.track is done elsewhere as we don't know
the disk parameters during the argument parsing yet.
We get the parameters after finishing the argument parsing.
> Anyway, \n is unnecessary, errx() does not print error based on
> errno, err() follows errno.
Sure, this was more of a copy'n'paste error.
> Thank, it's nice to see we have someone to test fdformat!
Np. Can test any time.
Going to rework the patch.
Thx,
Jaromir.
--
Jaromir Capik
Red Hat Czech, s.r.o.
Software Engineer / Secondary Arch
Email: jcapik@redhat.com
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkynova 99/71, 612 45, Brno, Czech Republic
IC: 27690016
next prev parent reply other threads:[~2014-07-28 16:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <844628876.22654954.1406302034993.JavaMail.zimbra@redhat.com>
2014-07-25 15:29 ` [PATCH] fdformat: Add new switches -f/--from, -t/--to, -r/--repair Jaromir Capik
2014-07-26 10:40 ` Sami Kerola
2014-07-28 14:38 ` Jaromir Capik
2014-07-28 15:10 ` Karel Zak
2014-07-28 16:01 ` Jaromir Capik [this message]
2014-07-28 19:15 ` Jaromir Capik
2014-07-29 11:32 ` Jaromir Capik
2014-07-29 11:53 ` Karel Zak
2014-09-08 17:50 ` Jaromir Capik
2014-09-16 9:15 ` 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=54850462.25033124.1406563271629.JavaMail.zimbra@redhat.com \
--to=jcapik@redhat.com \
--cc=kerolasa@gmail.com \
--cc=kzak@redhat.com \
--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.