Re: Console output corruption

Phil Goembel <[email protected]>
Newsgroups gmane.linux.ports.x8086
Message-ID <1271616041.19039.62.camel@castle>
On Sun, 2010-04-18 at 17:34 +0100, Hans wrote:
> ----- Original Message ----- 
> From: "Phil Goembel" <[email protected]>
> To: "Dieter Kedrowitsch" <[email protected]>
> Cc: <[email protected]>
> Sent: Sunday, April 18, 2010 3:50 PM
> Subject: Re: Console output corruption
>  
> > In elks/kernel/printk.c is the following code for parsing a format
> > string (line 139, right after detecting a '%'):
> > 
> >    width = zero = '0';
> >    if (c == '0')
> >        zero++;
> >    while (c >= '0' && c <= '9') {
> >        width *= 10;
> >        width += c - '0';
> >        c = *fmt++;
> >    }
> > 
> > Notice the width is being set to the value of an ASCII '0' character. I
> > think it should have been set to the integer value 0 (zero) instead.
> > 
> > It looks like, by default, all fields will have a width of whatever the
> > ASCII code for '0' (48?).
> > 
> > Phil
>  
> Phil you are the man!
>  
> I have just done a quick test and it seems to be fixed:
> 
>  Many thanks,
> 
> Hans
> www.ht-lab.com
> 
> 

You're welcome! Glad I could help.

But, as Mario pointed out, the latest printk.c in the sourceforge CVS
repository does not have this bug. You might want to update all your
sources from the sourceforge CVS repository in case there are other 
bug fixes you are missing.

Unless someone else thinks that's a bad idea. I have no idea how stable
the latest code is.


--
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.