Received: from eggs.gnu.org ([208.118.235.92]:59123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6oJR-0005Mf-N8 for qemu-devel@nongnu.org; Wed, 29 Aug 2012 15:52:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6oJQ-0004Js-Aq for qemu-devel@nongnu.org; Wed, 29 Aug 2012 15:52:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6oJQ-0004Jg-2W for qemu-devel@nongnu.org; Wed, 29 Aug 2012 15:52:28 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7TJqRJh002703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Aug 2012 15:52:27 -0400 From: Luiz Capitulino Date: Wed, 29 Aug 2012 16:52:58 -0300 Message-Id: <1346269986-13539-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1346269986-13539-1-git-send-email-lcapitulino@redhat.com> References: <1346269986-13539-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 1/9] error: add error_setg() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alevy@redhat.com Signed-off-by: Luiz Capitulino --- error.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/error.h b/error.h index 96fc203..da7fed3 100644 --- a/error.h +++ b/error.h @@ -30,6 +30,12 @@ typedef struct Error Error; void error_set(Error **err, ErrorClass err_class, const char *fmt, ...) GCC_FMT_ATTR(3, 4); /** + * Same as error_set(), but sets a generic error + */ +#define error_setg(err, fmt, ...) \ + error_set(err, ERROR_CLASS_GENERIC_ERROR, fmt, ## __VA_ARGS__) + +/** * Returns true if an indirect pointer to an error is pointing to a valid * error object. */ -- 1.7.11.2.249.g31c7954.dirty