OSDN Git Service

QError: new class for device encrypted errors
authorLuiz Capitulino <lcapitulino@redhat.com>
Mon, 7 Dec 2009 20:36:59 +0000 (21:36 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 7 Dec 2009 22:34:32 +0000 (16:34 -0600)
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qerror.c
qerror.h

index eb4ce33..d90529c 100644 (file)
--- 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",
     },
index 5198adf..c9fcf97 100644 (file)
--- 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 } }"