tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: aprint_* used outside autoconfiguration step
On Tue, Feb 19, 2019 at 10:49:04AM -0500, Christos Zoulas wrote:
> I've noticed that now the "autoconfiguration print" error messages
> are printing "autoconfiguration error: " we have a situation where
> aprint_ calls are happening outside the autoconfiguration process.
> This is confusing. What makes this difficult to fix is:
>
> 1. Some of the calls can happen during the autoconfiguration
> phase and also later (during normal operations). For example
> the iffoo_init() routine and its children calls.
> 2. We don't have a non-autoconfig-related family of printf
> calls to handle errors outside autoconfiguration.
>
> I propose to go for the simplest fix for now, which is to only print
> "autoconfiguration error: " during the autoconfiguration process (i.e.
> once autoconfiguration is done, to skip printing it. This again is
> wrong in some cases (hotplug), but something simplistic such as the
> following might take care of the majority of the cases:
While the primary reason I added this was to expose which parts of the
dmesg were actually errors, a secondary reason was to help curb the
abuse of aprint_error at runtime. While I'm of the opinion that aprint_*
should be used iff within the autoconf(9) paths, I'm also seeing now
that if you want a perfectly silent AB_SILENT boot, you can't have plain
printfs making a mess. So, somewhat reluctantly I accept the general
idea of your proposal as an immediate solution.
Jonathan Kollasch
Home |
Main Index |
Thread Index |
Old Index