[U-Boot] [PATCH] logbuff: Prevent an infinite loop for console output

Wolfgang Denk wd at denx.de
Tue Jun 8 23:47:35 CEST 2010


Dear Peter Tyser,

In message <1273253668.22784.57.camel at localhost.localdomain> you wrote:
>
> > 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?
> 
> Yes, it does break the stdout concept, but I went with the current patch
> for 3 reasons:

OK, then let's try and come up with a solution that does NOT break
this.

> 1. Most anything is better than the current board lockup that occurs
> without the change.

Even if I was willing to buy this one...

> 2. For most of the boot process serial_puts() is used to output messages
> (ie prior to GD_FLG_DEVINIT is set in gd->flags).  Continuing to use the
> same output method after GD_FLG_DEVINIT is set makes some degree of
> sense.

... this does not make sense to me.  As Detlev pointed out, it breaks
the concept of I/O redirection through stdout.

> I agree this fix isn't the best, but its better than the bug in my
> opinion.  Ideally someone who uses the logbuff could provide a more
> elegant fix.  Any takers?

I don't want to replace one bug (that bites you) with another one (
that bites somebody else).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I thought my people would grow tired of killing. But you were  right,
they  see it is easier than trading. And it has its pleasures. I feel
it myself. Like the hunt, but with richer rewards.
	-- Apella, "A Private Little War", stardate 4211.8


More information about the U-Boot mailing list