Re: Console output corruption

"Hans" <[email protected]>
Newsgroups gmane.linux.ports.x8086
Message-ID <4F372BE67AEE484695152152DA149A36@linux104>
----- 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:
 
Booting......
 
ELKS Boot........:
Console: BIOS(15x25)
PC/XT class machine, 80188 CPU
640K base RAM.
ELKS kernel (-14544 text + 7044 data + -16516 bss)
Kernel text at 1002:0000, data at 1c75:0000
471 K of memory for user processes.
Serial driver version 0.02
ttyS0 at 0x3f8 (irq = 4) is a 16450
ttyS1 at 0x2f8 (irq = 3) is a 16450
rd driver Copyright (C) 1997 Alistair Riddoch
hd Driver Copyright (C) 1994 Yggdrasil Computing, Inc.
Extended and modified for Linux 8086 by Alan Cox.
doshd: found 0 floppy drives
ELKS version 0.1.3-pre1
Release not defined
VFS: Insert root floppy and press ENTER

Many thanks,

Hans
www.ht-lab.com


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