summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2017-05-17 20:18:22 +0300
committerRichard Weinberger <richard@nod.at>2017-07-06 00:18:02 +0300
commit721ccae88d04f7e9334fde4cbb3eecfaa70a31ac (patch)
treebec5bb63020fc63017b1b2a98cc42f910a41e8a8 /arch
parentd3878bb8003009d148cd787e1a2d74cff914a7b2 (diff)
downloadlinux-721ccae88d04f7e9334fde4cbb3eecfaa70a31ac.tar.xz
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')
-rw-r--r--arch/um/include/shared/os.h2
-rw-r--r--arch/um/os-Linux/util.c9
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);
+}