From ac0ab49dba8bd18b1f26bba6e2bcf9670af887d2 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Fri, 26 Mar 2010 21:12:48 +0300 Subject: [PATCH] Add info() helper Signed-off-by: Cyrill Gorcunov Signed-off-by: Pekka Enberg --- tools/kvm/util.c | 14 ++++++++++++++ tools/kvm/util.h | 1 + 2 files changed, 15 insertions(+) diff --git a/tools/kvm/util.c b/tools/kvm/util.c index 2ef547e3180c..ee41488246a6 100644 --- a/tools/kvm/util.c +++ b/tools/kvm/util.c @@ -27,6 +27,11 @@ static void warn_builtin(const char *warn, va_list params) report(" Warning: ", warn, params); } +static void info_builtin(const char *info, va_list params) +{ + report(" Info: ", info, params); +} + void die(const char *err, ...) { va_list params; @@ -55,6 +60,15 @@ void warning(const char *warn, ...) va_end(params); } +void info(const char *info, ...) +{ + va_list params; + + va_start(params, info); + info_builtin(info, params); + va_end(params); +} + void die_perror(const char *s) { perror(s); diff --git a/tools/kvm/util.h b/tools/kvm/util.h index 3c553de5db31..ddb276871c4f 100644 --- a/tools/kvm/util.h +++ b/tools/kvm/util.h @@ -32,6 +32,7 @@ extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, extern void die_perror(const char *s) NORETURN; extern int error(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); +extern void info(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN); #define DIE_IF(cnd) \ -- 2.39.5