Received: from eggs.gnu.org ([140.186.70.92]:44574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdsK-0007zy-E1 for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:46:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTdsH-0003AO-Uj for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:46:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdsH-0003AC-FF for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:46:01 -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 p56HjWVu006522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 6 Jun 2011 13:46:00 -0400 Message-Id: <20110606165823.655254292@amt.cnet> Date: Mon, 06 Jun 2011 13:55:39 -0300 From: Marcelo Tosatti References: <20110606165536.581119615@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, Marcelo Tosatti , Jes.Sorensen@redhat.com, dlaor@redhat.com, avi@redhat.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 */