From patchwork Tue Dec 6 17:54:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 129799 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 708BE1007D6 for ; Wed, 7 Dec 2011 06:23:31 +1100 (EST) Received: from localhost ([::1]:53781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY0Kk-0006cE-UI for incoming@patchwork.ozlabs.org; Tue, 06 Dec 2011 14:05:42 -0500 Received: from eggs.gnu.org ([140.186.70.92]:45652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY0KE-00054e-76 for qemu-devel@nongnu.org; Tue, 06 Dec 2011 14:05:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RY0K7-0004Ha-2x for qemu-devel@nongnu.org; Tue, 06 Dec 2011 14:05:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY0K6-0004HC-Nm for qemu-devel@nongnu.org; Tue, 06 Dec 2011 14:05:03 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pB6J4UUO006950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 6 Dec 2011 14:05:01 -0500 Received: from localhost (ovpn-113-121.phx2.redhat.com [10.3.113.121]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pB6Ht1KE006185; Tue, 6 Dec 2011 12:55:02 -0500 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Tue, 6 Dec 2011 15:54:19 -0200 Message-Id: <1323194072-20046-10-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1323194072-20046-1-git-send-email-lcapitulino@redhat.com> References: <1323194072-20046-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 09/22] QError: Introduce QERR_IO_ERROR 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: Luiz Capitulino --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 656efc2..b544ced 100644 --- a/qerror.c +++ b/qerror.c @@ -149,6 +149,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Password incorrect", }, { + .error_fmt = QERR_IO_ERROR, + .desc = "An IO error has occurred", + }, + { .error_fmt = QERR_JSON_PARSING, .desc = "Invalid JSON syntax", }, diff --git a/qerror.h b/qerror.h index 161d654..1fee39d 100644 --- a/qerror.h +++ b/qerror.h @@ -126,6 +126,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_INVALID_PASSWORD \ "{ 'class': 'InvalidPassword', 'data': {} }" +#define QERR_IO_ERROR \ + "{ 'class': 'IOError', 'data': {} }" + #define QERR_JSON_PARSING \ "{ 'class': 'JSONParsing', 'data': {} }"