Re: Console output corruption

Phil Goembel <[email protected]>
Newsgroups gmane.linux.ports.x8086
Message-ID <1271602213.19039.16.camel@castle>
On Wed, 2010-03-10 at 13:25 -0500, Dieter Kedrowitsch wrote:
> Hans, thanks for the reply.
<snip>
> If anyone who is still following the list has the time and ability to
> help me out, please feel free to chime in!
> 
> Thanks!

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

--
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.