From patchwork Fri Dec 4 17:24:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2] QError: Add class for invalid passwords Date: Fri, 04 Dec 2009 07:24:08 -0000 From: Luiz Capitulino X-Patchwork-Id: 40357 Message-Id: <1259947449-17576-2-git-send-email-lcapitulino@redhat.com> To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com Signed-off-by: Luiz Capitulino --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 92d9622..18be7e3 100644 --- a/qerror.c +++ b/qerror.c @@ -61,6 +61,10 @@ const QErrorStringTable qerror_table[] = { .desc = "Invalid parameter type, expected: %(expected)", }, { + .error_fmt = QERR_INVALID_PASSWORD, + .desc = "The entered password is invalid", + }, + { .error_fmt = QERR_KVM_MISSING_CAP, .desc = "Using KVM without %(capability), %(feature) unavailable", }, diff --git a/qerror.h b/qerror.h index a747ff6..c9fcf97 100644 --- a/qerror.h +++ b/qerror.h @@ -53,6 +53,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_INVALID_PARAMETER_TYPE \ "{ 'class': 'InvalidParameterType', 'data': { 'name': %s,'expected': %s } }" +#define QERR_INVALID_PASSWORD \ + "{ 'class': 'InvalidPassword', 'data': {} }" + #define QERR_KVM_MISSING_CAP \ "{ 'class': 'KVMMissingCap', 'data': { 'capability': %s, 'feature': %s } }"