Re: Kernel-Messages translation

david parsons (o.r.c@p.e.l.l.p.o.r.t.l.a.n.d.o.r.u.s)
20 Jun 1997 21:46:51 -0700

In article <>,
linux kernel account <> wrote:
>On Fri, 20 Jun 1997, Rafal Maszkowski wrote:
>> setting up some ways of message->action translation in their minds. It
>> kernel module. It can't be a user space program because it won't work
>> during the kernel startup.
>Nonuserspace translations of boot messages for such users (ones who dont
>know much about linux) is of little importance. If the error message
>is fatal such that a userspace daemon could not translate the message for
>them then the course of action would be the same regardless of the actual
>message: "Call the Linux Guru"..
>I do however think a change would be good.. I would like to see messages
>replaced with things like
>KERNEL would be mandatory.. If there are only two field then it is a raw
>kernel problem.. If there are 3 then it is
>KERNEL.SUBSYS.SPECIFICERROR!MOREINFO.. You get the point.. L would be a
>severity level (I'm not sure what the current numbering system is.. but
>we'd use that..)

Not extraordinarily clear, though, if you don't have a language module
loaded (or a language-specific klogd running); the current scheme,
pit of seething anglocentrism that it is, at least has the advantage
of being readable to one group of non-necessarily technically competent

How about adding a code to the printks, like:

printk(SEVERITY CODE "english text", arguments);
| |
| |
bog-standard |
<number> |
not quite so bog-standard

if a language module is loaded (or a switch is set for a
language-specific klogd), it will either look for the
native message for the offending printk, then use that
as the format for the printf, or pass the {number} out
to klogd instead of the "english text" part.

The trivial solution, which is to have the language module
consist of printf format strings:

{1} -> "Console: %d point font, %d scans\n"

might fall over dead if there are languages where the order of
the arguments need to change for clarity. A possible extension
would be, I guess, to use

{1} -> "Console &1%d point font, &2%d scans\n"

And subvert & as a argument specifier.

david parsons \bi/ I have a clever proof for this, but don't have
\/ enough room in /tmp to add it to this message.