Patchwork [15/22] QError: New QERR_SNAPSHOT_NOT_FOUND

login
register
mail settings
Submitter Luiz Capitulino
Date April 20, 2010, 9:09 p.m.
Message ID <1271797792-24571-16-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/50589/
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 078fc43..c8e9393 100644
--- a/qerror.c
+++ b/qerror.c
@@ -105,6 +105,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Device '%(device)' doesn't support snapshots",
     },
     {
+        .error_fmt = QERR_SNAPSHOT_NOT_FOUND,
+        .desc      = "Could not find snapshot '%(name)' in device '%(device)'",
+    },
+    {
         .error_fmt = QERR_DUPLICATE_ID,
         .desc      = "Duplicate ID '%(id)' for %(object)",
     },
diff --git a/qerror.h b/qerror.h
index da12160..bf8af24 100644
--- a/qerror.h
+++ b/qerror.h
@@ -166,6 +166,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_SNAPSHOT_NO_DEVICE \
     "{ 'class': 'SnapshotNoDevice', 'data': {} }"
 
+#define QERR_SNAPSHOT_NOT_FOUND \
+    "{ 'class': 'SnapshotNotFound', 'data': { 'device': %s, 'name': %s } }"
+
 #define QERR_STATEVM_SAVE_FAILED \
     "{ 'class': 'StateVmSaveFailed', 'data': { 'reason': %s } }"