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 <mre...@redhat.com>
> > Signed-off-by: John Snow <js...@redhat.com>
> > Reviewed-by: Eric Blake <ebl...@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: pgp5NcMWTkGXm.pgp
Description: PGP signature

Reply via email to