From: Luiz Capitulino Date: Wed, 29 Aug 2012 14:20:57 +0000 (-0300) Subject: error: add error_setg() X-Git-Tag: v1.3.0-rc0~577^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75d789f8d38be693bbee3e77b558e59012e33997;p=thirdparty%2Fqemu.git error: add error_setg() Signed-off-by: Luiz Capitulino --- diff --git a/error.h b/error.h index 96fc20328f9..da7fed399e6 100644 --- a/error.h +++ b/error.h @@ -29,6 +29,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.