Message ID | 1299877249-13433-6-git-send-email-aliguori@us.ibm.com |
---|---|
State | New |
Headers | show |
On Fri, 11 Mar 2011 15:00:43 -0600 Anthony Liguori <aliguori@us.ibm.com> wrote: > Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> > > diff --git a/qerror.c b/qerror.c > index 78d3884..5a1e637 100644 > --- a/qerror.c > +++ b/qerror.c > @@ -109,6 +109,10 @@ static const QErrorStringTable qerror_table[] = { > .desc = "Duplicate ID '%(id)' for %(object)", > }, > { > + .error_fmt = QERR_ENUM_VALUE_INVALID, > + .desc = "Enum value '%(value)' is invalid for type '%(type)'", > + }, This doesn't seem to be used. > + { > .error_fmt = QERR_FD_NOT_FOUND, > .desc = "File descriptor named '%(name)' not found", > }, > diff --git a/qerror.h b/qerror.h > index 495d0a4..35e7253 100644 > --- a/qerror.h > +++ b/qerror.h > @@ -98,6 +98,9 @@ void qerror_set_desc(QError *qerr, const char *fmt); > #define QERR_DUPLICATE_ID \ > "{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }" > > +#define QERR_ENUM_VALUE_INVALID \ > + "{ 'class': 'EnumValueInvalid', 'data': { 'type': %s, 'value': %s } }" > + > #define QERR_FD_NOT_FOUND \ > "{ 'class': 'FdNotFound', 'data': { 'name': %s } }" >
diff --git a/qerror.c b/qerror.c index 78d3884..5a1e637 100644 --- a/qerror.c +++ b/qerror.c @@ -109,6 +109,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Duplicate ID '%(id)' for %(object)", }, { + .error_fmt = QERR_ENUM_VALUE_INVALID, + .desc = "Enum value '%(value)' is invalid for type '%(type)'", + }, + { .error_fmt = QERR_FD_NOT_FOUND, .desc = "File descriptor named '%(name)' not found", }, diff --git a/qerror.h b/qerror.h index 495d0a4..35e7253 100644 --- a/qerror.h +++ b/qerror.h @@ -98,6 +98,9 @@ void qerror_set_desc(QError *qerr, const char *fmt); #define QERR_DUPLICATE_ID \ "{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }" +#define QERR_ENUM_VALUE_INVALID \ + "{ 'class': 'EnumValueInvalid', 'data': { 'type': %s, 'value': %s } }" + #define QERR_FD_NOT_FOUND \ "{ 'class': 'FdNotFound', 'data': { 'name': %s } }"
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>