QError: Add class for invalid passwords
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 4 Dec 2009 17:24:08 +0000 (15:24 -0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 7 Dec 2009 20:04:19 +0000 (14:04 -0600)
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qerror.c
qerror.h

index d00e534..eb4ce33 100644 (file)
--- a/qerror.c
+++ b/qerror.c
@@ -57,6 +57,10 @@ static 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",
     },
index 5fd9931..5198adf 100644 (file)
--- a/qerror.h
+++ b/qerror.h
@@ -50,6 +50,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 } }"