From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4KiF-0007E5-BC for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:31 -0400 Received: from [140.186.70.92] (port=37386 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4Ki8-0007BN-LW for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4Ki6-0003yV-Ge for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57671) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Ki5-0003yI-Lt for qemu-devel@nongnu.org; Tue, 20 Apr 2010 17:10:22 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3KLAKJa019510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Apr 2010 17:10:21 -0400 From: Luiz Capitulino Date: Tue, 20 Apr 2010 18:09:40 -0300 Message-Id: <1271797792-24571-11-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1271797792-24571-1-git-send-email-lcapitulino@redhat.com> References: <1271797792-24571-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 10/22] QError: New QERR_SNAPSHOT_CREATE_FAILED List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, armbru@redhat.com, quintela@redhat.com, kwolf@redhat.com Signed-off-by: Luiz Capitulino --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 347ff36..e0df25f 100644 --- a/qerror.c +++ b/qerror.c @@ -181,6 +181,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Could not set password", }, { + .error_fmt = QERR_SNAPSHOT_CREATE_FAILED, + .desc = "Failed to create snapshot in device '%(device)' reason: %(reason)", + }, + { .error_fmt = QERR_SNAPSHOT_DELETE_FAILED, .desc = "Failed to delete snapshot in device '%(device)' reason: %(reason)", }, diff --git a/qerror.h b/qerror.h index 0c0023e..07ba419 100644 --- a/qerror.h +++ b/qerror.h @@ -151,6 +151,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_SET_PASSWD_FAILED \ "{ 'class': 'SetPasswdFailed', 'data': {} }" +#define QERR_SNAPSHOT_CREATE_FAILED \ + "{ 'class': 'SnapshotCreateFailed', 'data': { 'device': %s, 'reason': %s } }" + #define QERR_SNAPSHOT_DELETE_FAILED \ "{ 'class': 'SnapshotDeleteFailed', 'data': { 'device': %s, 'reason': %s } }" -- 1.7.1.rc1.12.ga6018