@@ -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)",
},
@@ -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 } }"
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)