[coreboot] [PATCH] v3: Improve printk reliability
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Thu Mar 19 13:39:24 CET 2009
On 19.03.2009 13:25, Peter Stuge wrote:
> Carl-Daniel Hailfinger wrote:
>
>> This patch tries to make printk more readable and reliable.
>>
>
> I like the idea.
>
>
>
>> Introduce "<almost NULL>" for string arguments with addresses
>> below 0x400.
>>
>
> I would like the message to be more informative. Include the address
> somehow..
>
> "<near-NULL %03x>" or so?
>
> (No, I don't want to make printf() recurse, but you get my idea. :)
>
I fully agree. I looked at the code repeatedly and I can't find a nice
and readable way to do it. Sure, there are hackish ways to achieve the
goal, but vtxprintf is already complicated enough to let me stop before
such a trick.
"<%03x near NULL>" would be an alternative with mostly readable code.
The new message reads "<near NULL>".
>> The idea is to catch garbage strings from stray pointers and print
>> "<GARBAGE>" instead.
>>
>
> Again request more informative text. For example I think
> "<non-ASCII characters>" would be much nicer.
>
Changed.
>> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
>>
>
> If you agree with my requests I say
>
> Acked-by: Peter Stuge <peter at stuge.se>
>
I'd like to postpone the near-NULL address printing until someone else
chimes in.
Except for that address printing, your suggestions have been
incorporated. OK to commit?
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the coreboot
mailing list