Patchwork [11/13] QError: Add QERR_DEVICE_NOT_ACTIVE

login
register
mail settings
Submitter Luiz Capitulino
Date Nov. 19, 2009, 1:05 a.m.
Message ID <1258592736-10252-12-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/38807/
State New
Headers show

Comments

Luiz Capitulino - Nov. 19, 2009, 1:05 a.m.
New class for device not active errors.

Signed-off-by: Luiz Capitulino <lcapitulino@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 a12e7f7..0c0a510 100644
--- a/qerror.c
+++ b/qerror.c
@@ -44,6 +44,10 @@  const QErrorStringTable qerror_table[] = {
         .error_fmt = QERR_DEVICE_NOT_FOUND,
         .desc      = "The %(device) device has not been found",
     },
+    {
+        .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 413acc6..c1be8b9 100644
--- a/qerror.h
+++ b/qerror.h
@@ -41,4 +41,7 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_NOT_FOUND \
         "{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"
 
+#define QERR_DEVICE_NOT_ACTIVE \
+        "{ 'class': 'DeviceNotActive', 'data': { 'device': %s } }"
+
 #endif /* QERROR_H */