Re: Console output corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Linux ia64]     [DCCP]     [Linux for ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux