From patchwork Wed Jun 15 17:14:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 100561 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 49BABB6F90 for ; Thu, 16 Jun 2011 04:46:51 +1000 (EST) Received: from localhost ([::1]:50019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWv71-00064L-Ns for incoming@patchwork.ozlabs.org; Wed, 15 Jun 2011 14:46:47 -0400 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 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 p5FHfQwx022947 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Jun 2011 13:41:26 -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 p5FHfPxZ008320; Wed, 15 Jun 2011 13:41:25 -0400 Received: from amt.cnet (vpn-10-33.rdu.redhat.com [10.11.10.33]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p5FHfOWO023071; Wed, 15 Jun 2011 13:41:24 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 0F3516560E9; Wed, 15 Jun 2011 14:41:08 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.5/8.14.5/Submit) id p5FHf6jL023925; Wed, 15 Jun 2011 14:41:06 -0300 Message-Id: <20110615174008.632550809@amt.cnet> User-Agent: quilt/0.48-1 Date: Wed, 15 Jun 2011 14:14:05 -0300 From: Marcelo Tosatti To: qemu-devel@nongnu.org References: <20110615171403.158790293@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, Marcelo Tosatti , Jes.Sorensen@redhat.com, dlaor@redhat.com, avi@redhat.com, stefanha@gmail.com, jdenemar@redhat.com Subject: [Qemu-devel] [patch 2/4] 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 */