Commit 721ccae8 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Richard Weinberger

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: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent d3878bb8
...@@ -244,6 +244,8 @@ extern void um_early_printk(const char *s, unsigned int n); ...@@ -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_fix_helper_signals(void);
extern void os_info(const char *fmt, ...) extern void os_info(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2))); __attribute__ ((format (printf, 1, 2)));
extern void os_warn(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
/* time.c */ /* time.c */
extern void os_idle_sleep(unsigned long long nsecs); extern void os_idle_sleep(unsigned long long nsecs);
......
...@@ -177,3 +177,12 @@ void os_info(const char *fmt, ...) ...@@ -177,3 +177,12 @@ void os_info(const char *fmt, ...)
vfprintf(stderr, fmt, list); vfprintf(stderr, fmt, list);
va_end(list); va_end(list);
} }
void os_warn(const char *fmt, ...)
{
va_list list;
va_start(list, fmt);
vfprintf(stderr, fmt, list);
va_end(list);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment