Patchwork [36/50] error: New QERR_DEVICE_NO_BUS

login
register
mail settings
Submitter Markus Armbruster
Date March 4, 2010, 3:56 p.m.
Message ID <1267718231-13303-37-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/46967/
State New
Headers show

Comments

Markus Armbruster - March 4, 2010, 3:56 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 b79b4fa..733723e 100644
--- a/qerror.c
+++ b/qerror.c
@@ -73,6 +73,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Device '%(device)' is not removable",
     },
     {
+        .error_fmt = QERR_DEVICE_NO_BUS,
+        .desc      = "Device '%(device)' has no child bus",
+    },
+    {
         .error_fmt = QERR_FD_NOT_FOUND,
         .desc      = "File descriptor named '%(name)' not found",
     },
diff --git a/qerror.h b/qerror.h
index 2b31a8d..e65f1f2 100644
--- a/qerror.h
+++ b/qerror.h
@@ -66,6 +66,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_NOT_REMOVABLE \
     "{ 'class': 'DeviceNotRemovable', 'data': { 'device': %s } }"
 
+#define QERR_DEVICE_NO_BUS \
+    "{ 'class': 'DeviceNoBus', 'data': { 'device': %s } }"
+
 #define QERR_FD_NOT_FOUND \
     "{ 'class': 'FdNotFound', 'data': { 'name': %s } }"