Patchwork [FOR,0.12,05/18] QError: New QERR_DEVICE_LOCKED

login
register
mail settings
Submitter Markus Armbruster
Date Dec. 7, 2009, 8:37 p.m.
Message ID <1260218236-22143-6-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/40539/
State New
Headers show

Comments

Markus Armbruster - Dec. 7, 2009, 8:37 p.m.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/qerror.c b/qerror.c
index 03e3b34..37e8072 100644
--- a/qerror.c
+++ b/qerror.c
@@ -49,6 +49,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "The %(device) is encrypted",
     },
     {
+        .error_fmt = QERR_DEVICE_LOCKED,
+        .desc      = "Device %(device) is locked",
+    },
+    {
         .error_fmt = QERR_DEVICE_NOT_ACTIVE,
         .desc      = "The %(device) device has not been activated by the guest",
     },
diff --git a/qerror.h b/qerror.h
index 062c0c4..be6cd68 100644
--- a/qerror.h
+++ b/qerror.h
@@ -44,6 +44,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_ENCRYPTED \
     "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }"
 
+#define QERR_DEVICE_LOCKED                                      \
+    "{ 'class': 'DeviceLocked', 'data': { 'device': %s } }"
+
 #define QERR_DEVICE_NOT_ACTIVE \
     "{ 'class': 'DeviceNotActive', 'data': { 'device': %s } }"