From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swjoi-0004SP-R4 for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Swjoh-0003QO-KC for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:03:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swjoh-0003Q2-9p for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:03:07 -0400 From: Luiz Capitulino Date: Wed, 1 Aug 2012 22:02:48 -0300 Message-Id: <1343869374-23417-29-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> References: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 28/34] error: add error_get_class() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, eblake@redhat.com Signed-off-by: Luiz Capitulino --- error.c | 5 +++++ error.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/error.c b/error.c index 6c8f7b8..15a2d06 100644 --- a/error.c +++ b/error.c @@ -69,6 +69,11 @@ const char *error_get_pretty(Error *err) return err->msg; } +ErrorClass error_get_class(const Error *err) +{ + return err->err_class; +} + void error_free(Error *err) { if (err) { diff --git a/error.h b/error.h index 905613a..7b85b50 100644 --- a/error.h +++ b/error.h @@ -46,6 +46,11 @@ Error *error_copy(const Error *err); const char *error_get_pretty(Error *err); /** + * Get the error class of an error object. + */ +ErrorClass error_get_class(const Error *err); + +/** * Propagate an error to an indirect pointer to an error. This function will * always transfer ownership of the error reference and handles the case where * dst_err is NULL correctly. Errors after the first are discarded. -- 1.7.11.2.249.g31c7954.dirty