[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16
From: |
Amos Kong |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16 |
Date: |
Tue, 05 Jun 2012 10:29:39 -0400 (EDT) |
----- Original Message -----
> On 06/02/2012 06:54 AM, Amos Kong wrote:
> > Signed-off-by: Amos Kong<address@hidden>
>
> I think QERR_INVALID_PARAMETER_VALUE is a more logical choice for the
> error
> you're generating.
I used this new error in [PATCH 6/6], if user inputs more than
16 keys once, this error will occur, even if all the keys are
valid.
If user sees the new error, they will identify that keys number
should be reduced. But 'QERR_INVALID_PARAMETER_VALUE' could not
pass this information to user.
Amos.
> Regards,
>
> Anthony Liguori
>
> > ---
> > qerror.c | 4 ++++
> > qerror.h | 3 +++
> > 2 files changed, 7 insertions(+), 0 deletions(-)
> >
> > diff --git a/qerror.c b/qerror.c
> > index 5092fe7..b66af09 100644
> > --- a/qerror.c
> > +++ b/qerror.c
> > @@ -172,6 +172,10 @@ static const QErrorStringTable qerror_table[]
> > = {
> > .desc = "Parameter '%(name)' expects %(expected)",
> > },
> > {
> > + .error_fmt = QERR_OVERFLOW,
> > + .desc = "Input is overflow",
> > + },
> > + {
> > .error_fmt = QERR_INVALID_PASSWORD,
> > .desc = "Password incorrect",
> > },
> > diff --git a/qerror.h b/qerror.h
> > index 4cbba48..dfe9c89 100644
> > --- a/qerror.h
> > +++ b/qerror.h
> > @@ -151,6 +151,9 @@ QError *qobject_to_qerror(const QObject *obj);
> > #define QERR_INVALID_PARAMETER_VALUE \
> > "{ 'class': 'InvalidParameterValue', 'data': { 'name': %s,
> > 'expected': %s } }"
> >
> > +#define QERR_OVERFLOW \
> > + "{ 'class': 'Overflow', 'data': {} }"
> > +
> > #define QERR_INVALID_PASSWORD \
> > "{ 'class': 'InvalidPassword', 'data': {} }"
> >
>
>
- [Qemu-devel] [PATCH v2 0/6] convert sendkey to qapi, Amos Kong, 2012/06/01
- [Qemu-devel] [PATCH v2 1/6] qerror: add QERR_OVERFLOW, Amos Kong, 2012/06/01
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add QERR_OVERFLOW, Anthony Liguori, 2012/06/04
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16,
Amos Kong <=
- Message not available
- Message not available
- Message not available
- Message not available
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16, Amos Kong, 2012/06/14
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16, Amos Kong, 2012/06/15
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16, Gerd Hoffmann, 2012/06/15
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16, Luiz Capitulino, 2012/06/15
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16, Amos Kong, 2012/06/18
- Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16, Amos Kong, 2012/06/19
[Qemu-devel] [PATCH v2 2/6] fix doc of using raw values with sendkey, Amos Kong, 2012/06/01
[Qemu-devel] [PATCH v2 4/6] hmp: rename arguments, Amos Kong, 2012/06/01
[Qemu-devel] [PATCH v2 3/6] rename keyname '<' to 'less', Amos Kong, 2012/06/01