Hi Peter,

> When using 'logbuff' as stdout and the console loglevel is greater
> than a message's loglevel it is supposed to be both logged, and printed
> to the console.  The logbuff_printk() function is responsible for both
> logging and displaying the message.  However, logbuff_printk()
> previously used printf() to print the message to the console.  The
> printf() call would eventually end up back in logbuff_printk(), and
> an infinite loop would occur which would hang a board.
>
> Using serial_puts() instead of printf() in logbuff_printk() avoids the
> recursion and resolves the issue.
>
> Signed-off-by: Peter Tyser <pty...@xes-inc.com>
> Reported-by: Dennis Ruffer <daruf...@gmail.com>

Hm.  What if a board has "stdout" set to "lcd" or "nc" or any other
device?  Do we really want the text to be output on the serial console
then?  Doesn't this break the whole "stdout" concept?

Cheers
  Detlev

-- 
Some people unfortunately like  jumping up and down about spaces but not code.
[...]   I'd rather read good poetry written in very bad hand writing than bad
poetry written in beautiful handwriting, and I think the same is true of code.
           -- Alan Cox <20090701130018.115ce...@lxorguk.ukuu.org.uk>
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to