All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 3/3] qemu-io: Correct error messages
Date: Tue, 27 Oct 2015 12:08:05 +0100	[thread overview]
Message-ID: <20151027110805.GD6692@noname.str.redhat.com> (raw)
In-Reply-To: <562EE0CE.1040401@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

Am 27.10.2015 um 03:26 hat Eric Blake geschrieben:
> On 10/26/2015 05:45 PM, John Snow wrote:
> > Reported-by: Max Reitz <mreitz@redhat.com>
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > Reviewed-by: Eric Blake <eblake@redhat.com>
> > ---
> >  qemu-io-cmds.c | 53 ++++++++++++++++++++++++++++++++++-------------------
> >  1 file changed, 34 insertions(+), 19 deletions(-)
> > 
> > diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
> > index 44d24e8..92c6b87 100644
> > --- a/qemu-io-cmds.c
> > +++ b/qemu-io-cmds.c
> > @@ -146,6 +146,21 @@ static int64_t cvtnum(const char *s)
> >      return ret;
> >  }
> >  
> > +static void print_cvtnum_err(int64_t rc, const char *arg)
> > +{
> > +    switch (rc) {
> > +    case -EINVAL:
> > +        printf("Parsing error: non-numeric argument,"
> > +               " or extraneous/unrecognized suffix -- %s\n", arg);
> > +        break;
> > +    case -ERANGE:
> > +        printf("Parsing error: argument too large -- %s\n", arg);
> > +        break;
> > +    default:
> > +        printf("Parsing error -- %s\n", arg);
> 
> I still think ':' is better than ' --' in error messages, but I'll leave
> it up to the maintainer.

This isn't important enough for a maintainer decision - if this isn't
something that the patch submitter can decide by himself, what else
would be left? In particular because the patch only retains the existing
format. I'm happy to merge a patch that uses colons instead, but I won't
reject anything just because it doesn't do the conversion.

Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2015-10-27 11:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 23:45 [Qemu-devel] [PATCH v2 0/3] qemu-io: clean up cvtnum usage John Snow
2015-10-26 23:45 ` [Qemu-devel] [PATCH v2 1/3] qemu-io: fix cvtnum lval types John Snow
2015-10-27 10:57   ` Kevin Wolf
2015-10-26 23:45 ` [Qemu-devel] [PATCH v2 2/3] qemu-io: Check for trailing chars John Snow
2015-10-27 11:05   ` Kevin Wolf
2015-10-26 23:45 ` [Qemu-devel] [PATCH v2 3/3] qemu-io: Correct error messages John Snow
2015-10-27  2:26   ` Eric Blake
2015-10-27 11:08     ` Kevin Wolf [this message]
2015-10-27 15:50     ` John Snow
2015-10-27 16:02       ` Kevin Wolf
2015-10-27 16:07       ` Eric Blake
2015-10-27 11:05   ` Kevin Wolf

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=20151027110805.GD6692@noname.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.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.