diff mbox

[FOR,0.12,01/18] QError: new class for device encrypted errors

Message ID 1260218236-22143-2-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Dec. 7, 2009, 8:36 p.m. UTC
From: Luiz Capitulino <lcapitulino@redhat.com>

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@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 eb4ce33..d90529c 100644
--- a/qerror.c
+++ b/qerror.c
@@ -45,6 +45,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc        = "The command %(name) has not been found",
     },
     {
+        .error_fmt = QERR_DEVICE_ENCRYPTED,
+        .desc      = "The %(device) is encrypted",
+    },
+    {
         .error_fmt = QERR_DEVICE_NOT_FOUND,
         .desc      = "The %(device) device has not been found",
     },
diff --git a/qerror.h b/qerror.h
index 5198adf..c9fcf97 100644
--- a/qerror.h
+++ b/qerror.h
@@ -41,6 +41,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_COMMAND_NOT_FOUND \
         "{ 'class': 'CommandNotFound', 'data': { 'name': %s } }"
 
+#define QERR_DEVICE_ENCRYPTED \
+        "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }"
+
 #define QERR_DEVICE_NOT_FOUND \
         "{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"