From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StM8F-0006V1-Ae for qemu-devel@nongnu.org; Mon, 23 Jul 2012 13:09:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StM89-0007ib-Ep for qemu-devel@nongnu.org; Mon, 23 Jul 2012 13:09:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StM89-0007iK-5A for qemu-devel@nongnu.org; Mon, 23 Jul 2012 13:09:13 -0400 Date: Mon, 23 Jul 2012 14:09:00 -0300 From: Luiz Capitulino Message-ID: <20120723140900.5e683e09@doriath.home> In-Reply-To: <1343053380-12133-3-git-send-email-benoit@irqsave.net> References: <1343053380-12133-1-git-send-email-benoit@irqsave.net> <1343053380-12133-3-git-send-email-benoit@irqsave.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V4 2/3] qerror: Add error telling that block dev usage prevents migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: benoit.canet@gmail.com Cc: kwolf@redhat.com, stefanha@linux.vnet.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, pbonzini@redhat.com, =?ISO-8859-1?B?QmVub+50?= Canet On Mon, 23 Jul 2012 16:22:59 +0200 benoit.canet@gmail.com wrote: > From: Beno=EEt Canet >=20 > Signed-off-by: Benoit Canet > --- > qerror.c | 4 ++++ > qerror.h | 3 +++ > 2 files changed, 7 insertions(+) >=20 > diff --git a/qerror.c b/qerror.c > index 92c4eff..d2e76ca 100644 > --- a/qerror.c > +++ b/qerror.c > @@ -283,6 +283,10 @@ static const QErrorStringTable qerror_table[] =3D { > .desc =3D "Could not set password", > }, > { > + .error_fmt =3D QERR_BLOCK_DEV_IN_USE_MIGRATION_PREVENTED, > + .desc =3D "Block device in use migration prevented", > + }, Let's avoid an specific error. We have two options: 1. Use QERR_MIGRATION_NOT_SUPPORTED 2. Add QERR_MIGRATION_BLOCKED > + { > .error_fmt =3D QERR_TOO_MANY_FILES, > .desc =3D "Too many open files", > }, > diff --git a/qerror.h b/qerror.h > index b4c8758..2ef40b5 100644 > --- a/qerror.h > +++ b/qerror.h > @@ -233,6 +233,9 @@ QError *qobject_to_qerror(const QObject *obj); > #define QERR_SET_PASSWD_FAILED \ > "{ 'class': 'SetPasswdFailed', 'data': {} }" > =20 > +#define QERR_BLOCK_DEV_IN_USE_MIGRATION_PREVENTED \ > + "{ 'class': 'BlockDevInUseMigrationPrevented', 'data': {} }" > + > #define QERR_TOO_MANY_FILES \ > "{ 'class': 'TooManyFiles', 'data': {} }" > =20