Re: Console output corruption

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

 



On Sun, 2010-04-18 at 17:34 +0100, Hans wrote:
> ----- Original Message ----- 
> From: "Phil Goembel" <phil-goembel@xxxxxxxxx>
> To: "Dieter Kedrowitsch" <dieter.kedrowitsch@xxxxxxxxx>
> Cc: <linux-8086@xxxxxxxxxxxxxxx>
> 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 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