tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Converting kernel printf() to aprint_*() or log()



In article <20141118201629.GA30223@stishovite>,
Izaak  <yitzhak%inbox.ru@localhost> wrote:
>On Tue, Nov 11, 2014 at 06:35:48PM -0500, Christos Zoulas wrote:
>> On Nov 11, 11:11pm, martin%duskware.de@localhost (Martin Husemann) wrote:
>> -- Subject: Re: Converting kernel printf() to aprint_*() or log()
>> 
>> | That sounds like a good plan, please correct me if I understood
>> | wrong:
>> | 
>> |  - create a log_dev(device_t, const char *fmt, ...) function and use that
>> |    in drivers instead of printf() when not in the driver's *_attach()
>> |    function (or functions only called from that); use log(9) where
>> |    appropriate instead for printfs not using device_xname().
>> 
>> Yes, it should be:
>> 
>>     void log_dev(device_t dev, int level, const char *fmt, ...);
>> 
>> as originally proposed.
>> 
>> |  - find simple printf-family calls inside driver's *_attach() functions
>> |    (or functions only called from those) and convert them to aprint_*.
>> 
>> Right.
>So, is this the final decision then? What about Jared McNeill's comment and
>the questions raised by Taylor R Campbell? 
>

device_printf() does not log, and it does not have a level. It seems to
to print, error, warnings, information etc. I think that most of
device_printf's should be converted to the appropriate log_dev() with
a level and device_printf() should be deprecated. 

christos



Home | Main Index | Thread Index | Old Index