Bug 811 - Avoid messages when quiet
Summary: Avoid messages when quiet
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.15.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-13 22:02 UTC by Robert Schwebel
Modified: 2009-12-14 23:35 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
patch (1.59 KB, patch)
2009-12-13 22:02 UTC, Robert Schwebel
Details
Fix (849 bytes, patch)
2009-12-14 00:31 UTC, Denys Vlasenko
Details
fix logic of the last fix (876 bytes, patch)
2009-12-14 22:41 UTC, Robert Schwebel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schwebel 2009-12-13 22:02:56 UTC
Created attachment 839 [details]
patch

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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Comment 1 Denys Vlasenko 2009-12-14 00:30:58 UTC
(In reply to comment #0)
> I've tried to use busybox with CONFIG_FEATURE_EXTRA_QUIET, but init's
> startup banner does still appear.

How about you start with describing what do you want to achieve?
Since you didn't, I have to resort to guessing. Are you trying to suppress

init started: BusyBox v1.XX.Y

message?

> 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?

Are you asking me? I am not the author.

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

No, the patch vandalizes message(L_LOG, xxx) behavior. That full_write it removes is not duplicate.

> The second part of the patch changes the file descriptor to stdout
> instead of stderr.

Why?
Comment 2 Denys Vlasenko 2009-12-14 00:31:53 UTC
Created attachment 841 [details]
Fix

Please try attached patch
Comment 3 Robert Schwebel 2009-12-14 22:30:03 UTC
(In reply to comment #2)
> Please try attached patch

Looks good, thanks for investigating.

However, the logic seems to be reverse. If ENABLE_FEATURE_EXTRA_QUIET is selected, the message *is* printed (and thus it is not extra quiet).

Robert
Comment 4 Robert Schwebel 2009-12-14 22:41:31 UTC
Created attachment 855 [details]
fix logic of the last fix
Comment 5 Denys Vlasenko 2009-12-14 23:35:54 UTC
OH NO!!!... :)

Thanks, fixed.