diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2017-05-18 02:18:22 +0900 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2017-07-05 23:18:02 +0200 |
commit | 721ccae88d04f7e9334fde4cbb3eecfaa70a31ac (patch) | |
tree | bec5bb63020fc63017b1b2a98cc42f910a41e8a8 /arch/um | |
parent | d3878bb8003009d148cd787e1a2d74cff914a7b2 (diff) | |
download | linux-stable-721ccae88d04f7e9334fde4cbb3eecfaa70a31ac.tar.gz linux-stable-721ccae88d04f7e9334fde4cbb3eecfaa70a31ac.tar.bz2 linux-stable-721ccae88d04f7e9334fde4cbb3eecfaa70a31ac.zip |
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 <mhiramat@kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/include/shared/os.h | 2 | ||||
-rw-r--r-- | arch/um/os-Linux/util.c | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index 9e95bcebaf9b..574e03fc7ba2 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 c9bad1bca108..8cc8b2617a67 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); +} |