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


Groups > linux.kernel > #1632778

[RFC PATCH 6/7] um: Suppress non-fatal messages when quiet

From Masami Hiramatsu <mhiramat@kernel.org>
Newsgroups linux.kernel
Subject [RFC PATCH 6/7] um: Suppress non-fatal messages when quiet
Date 2017-04-28 12:30 +0200
Message-ID <tBbjX-614-9@gated-at.bofh.it> (permalink)
References <tBbjX-614-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Suppress non-fatal boot messages when "quiet" kernel
parameter is given.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 arch/um/os-Linux/util.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c
index 8745f23..7afcb41 100644
--- a/arch/um/os-Linux/util.c
+++ b/arch/um/os-Linux/util.c
@@ -13,6 +13,7 @@
 #include <wait.h>
 #include <sys/mman.h>
 #include <sys/utsname.h>
+#include <init.h>
 #include <os.h>
 
 void stack_protections(unsigned long address)
@@ -153,10 +154,25 @@ void um_early_printk(const char *s, unsigned int n)
 	printf("%.*s", n, s);
 }
 
+static int quiet_non_fatal;
+
+static int __init quiet_cmd_param(char *str, int *add)
+{
+	quiet_non_fatal = 1;
+	return 0;
+}
+
+__uml_setup("quiet", quiet_cmd_param,
+"quiet\n"
+"    Turns off non-fatal message during boot.\n\n");
+
 void non_fatal(const char *fmt, ...)
 {
 	va_list list;
 
+	if (quiet_non_fatal)
+		return;
+
 	va_start(list, fmt);
 	vfprintf(stderr, fmt, list);
 	va_end(list);

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


Thread

[RFC PATCH 6/7] um: Suppress non-fatal messages when quiet Masami Hiramatsu <mhiramat@kernel.org> - 2017-04-28 12:30 +0200

csiph-web