Re: Errors on non existing partitions

Winfried Truemper (
Tue, 20 Jan 1998 00:47:03 +0100 (MET)

On Mon, 19 Jan 1998, Steffen Grunewald wrote:

> As far as I can tell, most kernel messages (not only Linux') are in hex.

My kernel prints at startup:

tty00 at 0x03f8 (irq = 4) is a 16450
tty01 at 0x02f8 (irq = 3) is a 16450
tty02 at 0x03e8 (irq = 7) is a 16550A

As you can see, the portnumber is prefixed with a 0x, but the IRQ is
decimal. So at least for some parts of the kernel, hex numbers are
clearly indicated as such and distinguished from decimal numbers.

Depending on the context, it is more convinient and common to use hex
or decimal. It simply avoids confusion and (human) conversion errors.
Figure out the mess if the kernel would print dotted IP-numbers using
hexadecimal notation (without prefix, of course).

> They aren't meant to be read by mere humans anyway :-)

There may be messages which can only be interpreted by kernel
developers, e.g. processor registers. These sort of messages should
be written down verbatim and sent to the maintainers.. Given the huge
number of Linux users, it should be clear that the fewest messages
should be of this type.

Most messages /should/ be read by "mere humans" (system administrators).
That's why they are quite verbose.

> Would you like the kernel being bloated by 0x... prefixes for every oops
> and panic message ?!?!^

I did some naive statistics on my 2.0.33 kernel image:

cd /usr/src/linux
strings vmlinux > /tmp/kmsg
# handcrafted editing
grep -E "%[0-9]*x" /tmp/kmsg | wc -l

So we have 130 lines which are a candidates for the 0x prefix. Even if
we assume an average of 5 new 0x-prefixes for each of this lines, they
enlarge the kernel only by 650 bytes (upper limit).

The fact that memory allocated by the kernel is holy is a strong argument
/for/ prefixing hex numbers: if you invest 50 bytes for a message, you
should not really save those 4 bytes which make this message unmistakable.

Full-screen oopses are different, because the space on the standard 80x25
screen is limited and 0x prefixes lower the readability in this special