From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S64JZ-00011r-V5 for qemu-devel@nongnu.org; Fri, 09 Mar 2012 13:13:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S64JT-0006Mb-JK for qemu-devel@nongnu.org; Fri, 09 Mar 2012 13:13:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S64JT-0006MJ-CC for qemu-devel@nongnu.org; Fri, 09 Mar 2012 13:13:11 -0500 From: Luiz Capitulino Date: Fri, 9 Mar 2012 15:13:03 -0300 Message-Id: <1331316786-7752-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1331316786-7752-1-git-send-email-lcapitulino@redhat.com> References: <1331316786-7752-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 1/4] QError: Introduce new errors for the migration command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, aliguori@us.ibm.com, jan.kiszka@siemens.com, quintela@redhat.com The new errors are QERR_MIGRATION_ACTIVE and QERR_MIGRATION_NOT_SUPPORTED, which are going to be used by the QAPI converted migration command. Signed-off-by: Luiz Capitulino --- qerror.c | 8 ++++++++ qerror.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/qerror.c b/qerror.c index f55d435..41c729a 100644 --- a/qerror.c +++ b/qerror.c @@ -193,6 +193,14 @@ static const QErrorStringTable qerror_table[] = { .desc = "Using KVM without %(capability), %(feature) unavailable", }, { + .error_fmt = QERR_MIGRATION_ACTIVE, + .desc = "There's a migration process in progress", + }, + { + .error_fmt = QERR_MIGRATION_NOT_SUPPORTED, + .desc = "State blocked by non-migratable device '%(device)'", + }, + { .error_fmt = QERR_MIGRATION_EXPECTED, .desc = "An incoming migration is expected before this command can be executed", }, diff --git a/qerror.h b/qerror.h index e26c635..e16f9c2 100644 --- a/qerror.h +++ b/qerror.h @@ -166,6 +166,12 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_KVM_MISSING_CAP \ "{ 'class': 'KVMMissingCap', 'data': { 'capability': %s, 'feature': %s } }" +#define QERR_MIGRATION_ACTIVE \ + "{ 'class': 'MigrationActive', 'data': {} }" + +#define QERR_MIGRATION_NOT_SUPPORTED \ + "{ 'class': 'MigrationNotSupported', 'data': {'device': %s} }" + #define QERR_MIGRATION_EXPECTED \ "{ 'class': 'MigrationExpected', 'data': {} }" -- 1.7.9.2.384.g4a92a