From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOclw-0005it-14 for qemu-devel@nongnu.org; Mon, 23 May 2011 17:34:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOclu-0001s4-4c for qemu-devel@nongnu.org; Mon, 23 May 2011 17:34:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOclt-0001rK-J3 for qemu-devel@nongnu.org; Mon, 23 May 2011 17:34:41 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4NLYe3H008529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 May 2011 17:34:40 -0400 Message-Id: <20110523213410.806751520@amt.cnet> Date: Mon, 23 May 2011 18:31:18 -0300 From: Marcelo Tosatti References: <20110523213115.164535428@amt.cnet> Content-Disposition: inline; filename=blockcopy-qerror Subject: [Qemu-devel] [patch 3/7] Add error messages for live block copy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com, dlaor@redhat.com, avi@redhat.com, Marcelo Tosatti Signed-off-by: Marcelo Tosatti 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 */