aboutsummaryrefslogtreecommitdiff
path: root/util/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/error.c')
-rw-r--r--util/error.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/error.c b/util/error.c
index 4518642881..8f12f67012 100644
--- a/util/error.c
+++ b/util/error.c
@@ -56,6 +56,15 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
va_end(ap);
}
+void error_setg(Error **errp, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ error_setv(errp, ERROR_CLASS_GENERIC_ERROR, fmt, ap);
+ va_end(ap);
+}
+
void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
const char *fmt, ...)
{