summaryrefslogtreecommitdiffstats
path: root/patches/busybox-1.10.4/generic/busybox-1.10.4-init-extra-quiet.diff
blob: ef5de133aea2ba3ecd0fda2334196348b7e3d890 (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
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>

---
 init/init.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Index: busybox-1.10.4/init/init.c
===================================================================
--- busybox-1.10.4.orig/init/init.c
+++ busybox-1.10.4/init/init.c
@@ -166,16 +166,11 @@ static void message(int where, const cha
 				}
 			}
 		}
-		if (where & L_LOG) {
-			full_write(log_fd, msg, l);
-			if (log_fd == 2)
-				return; /* don't print dup messages */
-		}
 	}
 
 	if (where & L_CONSOLE) {
 		/* Send console messages to console so people will see them. */
-		full_write(2, msg, l);
+		full_write(1, msg, l);
 	}
 }