Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4L2W-0006hj-QU for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:31:28 -0400 Received: from [140.186.70.92] (port=48260 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4L2V-0006gL-4j for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:31:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4L2S-0006km-Jy for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:31:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46737) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4L2S-0006kg-BD for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:31:24 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3KLVN9N030901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Apr 2010 17:31:23 -0400 From: Juan Quintela In-Reply-To: <1271797792-24571-13-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Tue, 20 Apr 2010 18:09:42 -0300") References: <1271797792-24571-1-git-send-email-lcapitulino@redhat.com> <1271797792-24571-13-git-send-email-lcapitulino@redhat.com> Date: Tue, 20 Apr 2010 23:31:22 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 12/22] QError: New QERR_STATEVM_SAVE_FAILED List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kwolf@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com Luiz Capitulino wrote: > Signed-off-by: Luiz Capitulino VMState already used for two things in qemu, but I think that changing to StateVM _only_ on the error messages is wrong. Leave it as vmstate, and if rest of things get ever changed, change just everything? > --- > qerror.c | 4 ++++ > qerror.h | 3 +++ > 2 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/qerror.c b/qerror.c > index aa6892d..95c1a95 100644 > --- a/qerror.c > +++ b/qerror.c > @@ -197,6 +197,10 @@ static const QErrorStringTable qerror_table[] = { > .desc = "No block device can accept snapshots", > }, > { > + .error_fmt = QERR_STATEVM_SAVE_FAILED, > + .desc = "Failed to save VM state (%(reason))", > + }, > + { > .error_fmt = QERR_TOO_MANY_FILES, > .desc = "Too many open files", > }, > diff --git a/qerror.h b/qerror.h > index 4a056b3..b915e26 100644 > --- a/qerror.h > +++ b/qerror.h > @@ -163,6 +163,9 @@ QError *qobject_to_qerror(const QObject *obj); > #define QERR_SNAPSHOT_NO_DEVICE \ > "{ 'class': 'SnapshotNoDevice', 'data': {} }" > > +#define QERR_STATEVM_SAVE_FAILED \ > + "{ 'class': 'StateVmSaveFailed', 'data': { 'reason': %s } }" > + > #define QERR_TOO_MANY_FILES \ > "{ 'class': 'TooManyFiles', 'data': {} }"