From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Goembel Subject: Re: Console output corruption Date: Sun, 18 Apr 2010 09:50:13 -0500 Message-ID: <1271602213.19039.16.camel@castle> References: <7A01080381764DE0B2C2FF7F21F4DF7E@linux104> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-8086-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Dieter Kedrowitsch Cc: linux-8086@vger.kernel.org On Wed, 2010-03-10 at 13:25 -0500, Dieter Kedrowitsch wrote: > Hans, thanks for the reply. > 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