From patchwork Mon May 23 21:31:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 97072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9125AB6FBA for ; Tue, 24 May 2011 07:36:29 +1000 (EST) Received: from localhost ([::1]:49132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOcna-0008Gp-Pz for incoming@patchwork.ozlabs.org; Mon, 23 May 2011 17:36:26 -0400 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 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4NLYdI6006073; Mon, 23 May 2011 17:34:39 -0400 Received: from amt.cnet (vpn-11-169.rdu.redhat.com [10.11.11.169]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p4NLYcQO004475; Mon, 23 May 2011 17:34:38 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 7613F6520E5; Mon, 23 May 2011 18:34:22 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.4/8.14.4/Submit) id p4NLYLVk004591; Mon, 23 May 2011 18:34:21 -0300 Message-Id: <20110523213410.806751520@amt.cnet> User-Agent: quilt/0.48-1 Date: Mon, 23 May 2011 18:31:18 -0300 From: Marcelo Tosatti To: qemu-devel@nongnu.org References: <20110523213115.164535428@amt.cnet> Content-Disposition: inline; filename=blockcopy-qerror X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com, dlaor@redhat.com, avi@redhat.com, Marcelo Tosatti Subject: [Qemu-devel] [patch 3/7] Add error messages for live block copy X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 */