summaryrefslogtreecommitdiffstats
path: root/patches/busybox-1.13.4/busybox-1.10.4-init-extra-quiet.diff
blob: f1d6e51401ab924830c715d5b4797d3aa45596fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Subject: Avoid messages when quiet
From: Robert Schwebel <r.schwebel@pengutronix.de>

I've tried to use busybox with CONFIG_FEATURE_EXTRA_QUIET, but init's
startup banner does still appear. I don't understand the intended logic
behind the sniplet patched below: it is in an 'else' part that is only
executed if the syslog feature is not enabled; why should something
printed out differently if syslog is not enabled?

So this patch removes the duplicate full_write and delegates it to the
normal one.

The second part of the patch changes the file descriptor to stdout
instead of stderr. Init doesn't print out errors.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>

ported to busybox-1.13.2

Signed-ogg-by: Marc Kleine-Budde <mkl@pengutronix.de>

---
 init/init.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: busybox-1.13.2/init/init.c
===================================================================
--- busybox-1.13.2.orig/init/init.c
+++ busybox-1.13.2/init/init.c
@@ -152,16 +152,22 @@ static void message(int where, const cha
 				}
 			}
 		}
+#if 0
 		if (where & L_LOG) {
 			full_write(log_fd, msg, l);
 			if (log_fd == STDERR_FILENO)
 				return; /* don't print dup messages */
 		}
+#endif
 	}
 
 	if (where & L_CONSOLE) {
 		/* Send console messages to console so people will see them. */
+#if 0
 		full_write(STDERR_FILENO, msg, l);
+#else
+		full_write(STDOUT_FILENO, msg, l);
+#endif
 	}
 }