Patchwork [09/22] QError: New QERR_SNAPSHOT_DELETE_FAILED

login
register
mail settings
Submitter Luiz Capitulino
Date April 20, 2010, 9:09 p.m.
Message ID <1271797792-24571-10-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/50584/
State New
Headers show

Comments

Luiz Capitulino - April 20, 2010, 9:09 p.m.
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 648d438..347ff36 100644
--- a/qerror.c
+++ b/qerror.c
@@ -181,6 +181,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Could not set password",
     },
     {
+        .error_fmt = QERR_SNAPSHOT_DELETE_FAILED,
+        .desc      = "Failed to delete snapshot in device '%(device)' reason: %(reason)",
+    },
+    {
         .error_fmt = QERR_SNAPSHOT_NO_DEVICE,
         .desc      = "No block device can accept snapshots",
     },
diff --git a/qerror.h b/qerror.h
index 2f6633c..0c0023e 100644
--- a/qerror.h
+++ b/qerror.h
@@ -151,6 +151,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_SET_PASSWD_FAILED \
     "{ 'class': 'SetPasswdFailed', 'data': {} }"
 
+#define QERR_SNAPSHOT_DELETE_FAILED \
+    "{ 'class': 'SnapshotDeleteFailed', 'data': { 'device': %s, 'reason': %s } }"
+
 #define QERR_SNAPSHOT_NO_DEVICE \
     "{ 'class': 'SnapshotNoDevice', 'data': {} }"