diff mbox

[1/2] QError: Add class for invalid passwords

Message ID 1259947449-17576-2-git-send-email-lcapitulino@redhat.com
State New
Headers show

Commit Message

Luiz Capitulino Dec. 4, 2009, 5:24 p.m. UTC
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
diff mbox

Patch

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 } }"