diff mbox

[3/7] Add error messages for live block copy

Message ID 20110523213410.806751520@amt.cnet
State New
Headers show

Commit Message

Marcelo Tosatti May 23, 2011, 9:31 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 */