diff mbox

[2/4] Add error messages for live block copy

Message ID 20110615174008.632550809@amt.cnet
State New
Headers show

Commit Message

Marcelo Tosatti June 15, 2011, 5:14 p.m. UTC
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff mbox

Patch

Index: qemu-block-copy/qerror.c
===================================================================
--- qemu-block-copy.orig/qerror.c
+++ qemu-block-copy/qerror.c
@@ -209,6 +209,14 @@  static const QErrorStringTable qerror_ta
         .error_fmt = QERR_VNC_SERVER_FAILED,
         .desc      = "Could not start VNC server on %(target)",
     },
+    {
+        .error_fmt = QERR_IN_PROGRESS,
+        .desc      = "Operation %(operation) in progress",
+    },
+    {
+        .error_fmt = QERR_BLOCKCOPY_IMAGE_SIZE_DIFFERS,
+        .desc      = "Length of destination image differs from source image",
+    },
     {}
 };
 
Index: qemu-block-copy/qerror.h
===================================================================
--- qemu-block-copy.orig/qerror.h
+++ qemu-block-copy/qerror.h
@@ -174,4 +174,10 @@  QError *qobject_to_qerror(const QObject 
 #define QERR_FEATURE_DISABLED \
     "{ 'class': 'FeatureDisabled', 'data': { 'name': %s } }"
 
+#define QERR_IN_PROGRESS \
+    "{ 'class': 'InProgress', 'data': { 'operation': %s } }"
+
+#define QERR_BLOCKCOPY_IMAGE_SIZE_DIFFERS \
+    "{ 'class': 'BlockCopyImageSizeDiffers', 'data': {} }"
+
 #endif /* QERROR_H */