Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1643532

[PATCH v3 4/6] um: Add os_warn() for pre-boot warning/error messages

From Masami Hiramatsu <mhiramat@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v3 4/6] um: Add os_warn() for pre-boot warning/error messages
Date 2017-05-17 19:20 +0200
Message-ID <tIaM9-5Vz-11@gated-at.bofh.it> (permalink)
References <tIaM9-5Vz-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 arch/um/include/shared/os.h |    2 ++
 arch/um/os-Linux/util.c     |    9 +++++++++
 2 files changed, 11 insertions(+)

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);
+}

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/6] um: Output messages to stderr and support quiet option Masami Hiramatsu <mhiramat@kernel.org> - 2017-05-17 19:20 +0200
  [PATCH v3 1/6] um: Use printk instead of printf in make_uml_dir Masami Hiramatsu <mhiramat@kernel.org> - 2017-05-17 19:20 +0200
  [PATCH v3 4/6] um: Add os_warn() for pre-boot warning/error messages Masami Hiramatsu <mhiramat@kernel.org> - 2017-05-17 19:20 +0200
  [PATCH v3 5/6] um: Use os_warn to print out pre-boot warning/error messages Masami Hiramatsu <mhiramat@kernel.org> - 2017-05-17 19:30 +0200
  [PATCH v3 3/6] um: Use os_info for the messages on normal path Masami Hiramatsu <mhiramat@kernel.org> - 2017-05-17 19:30 +0200
  [PATCH v3 2/6] um: Add os_info() for pre-boot information messages Masami Hiramatsu <mhiramat@kernel.org> - 2017-05-17 19:30 +0200
  [PATCH v3 6/6] um: console: Ignore console= option Masami Hiramatsu <mhiramat@kernel.org> - 2017-05-17 19:30 +0200

csiph-web