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

Problems with printk() function



On Dec 19, 2011, at 1:24 AM, Hoover, Victor P CTR NAVAIR, AIR 4.1.3.3 wrote:

> I understand its purpose and it obviously isn't supporting the precision
> value in this case.  I questioned this because all of the existing debug
> code in the network.c module I'm debugging uses %2.2x for displays.  I
> would think that if the precision field wasn't supported then the original
> code wouldn't be trying to use it.

You're seeing the FreeBSD heritage of the network code.  
I infer from it that the FreeBSD printk is more capable than the routine provided by RTEMS.

> 
> I couldn't find anything specific to this searching through the mailing
> list and the bugzilla data base.  However I do recall seeing a posting
> somewhere saying that printk() should support all sprint() capabilities.
> The question really becomes, is it supposed to support precision values.

I don't think that there's any standard that says what printk is supposed to provide.
My feeling is that it should be as small and simple as possible to enhance its chances of working as an diagnostic message reporting mechanism of last resort.
-- 
Eric Norum
wenorum at lbl.gov