From: Masami Hiramatsu Date: Wed, 17 May 2017 17:18:22 +0000 (+0900) Subject: um: Add os_warn() for pre-boot warning/error messages X-Git-Tag: v4.14-rc1~447^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=721ccae88d04f7e9334fde4cbb3eecfaa70a31ac;p=platform%2Fkernel%2Flinux-rpi.git um: Add os_warn() for pre-boot warning/error messages Add os_warn() for printing out pre-boot warning/error messages in stderr. The messages via os_warn() are not suppressed by quiet option. Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger --- diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index 9e95bce..574e03f 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h @@ -244,6 +244,8 @@ extern void um_early_printk(const char *s, unsigned int n); extern void os_fix_helper_signals(void); extern void os_info(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +extern void os_warn(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); /* time.c */ extern void os_idle_sleep(unsigned long long nsecs); diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index c9bad1b..8cc8b26 100644 --- a/arch/um/os-Linux/util.c +++ b/arch/um/os-Linux/util.c @@ -177,3 +177,12 @@ void os_info(const char *fmt, ...) vfprintf(stderr, fmt, list); va_end(list); } + +void os_warn(const char *fmt, ...) +{ + va_list list; + + va_start(list, fmt); + vfprintf(stderr, fmt, list); + va_end(list); +}