Received: from eggs.gnu.org ([140.186.70.92]:46952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWu5r-0004Ee-LC for qemu-devel@nongnu.org; Wed, 15 Jun 2011 13:41:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWu5o-00062Y-Gw for qemu-devel@nongnu.org; Wed, 15 Jun 2011 13:41:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWu5n-00062E-TV for qemu-devel@nongnu.org; Wed, 15 Jun 2011 13:41:28 -0400 Message-Id: <20110615174008.632550809@amt.cnet> Date: Wed, 15 Jun 2011 14:14:05 -0300 From: Marcelo Tosatti References: <20110615171403.158790293@amt.cnet> Content-Disposition: inline; filename=blockcopy-qerror Subject: [Qemu-devel] [patch 2/4] 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, Marcelo Tosatti , Jes.Sorensen@redhat.com, dlaor@redhat.com, avi@redhat.com, stefanha@gmail.com, jdenemar@redhat.com 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 */