Messages in this thread | ![/](/images/icornerl.gif) | | Date | Fri, 11 Apr 2003 21:10:39 +0300 | From | Matti Aarnio <> | Subject | Re: kernel support for non-English user messages |
| |
On Fri, Apr 11, 2003 at 12:57:28PM -0400, Chuck Ebbert wrote: > Alan Cox wrote: ... > I still see some problems... > For one, there are 131 instances of: > printk("%s\n", blurb); > > in various forms in 2.5.66. Besides possible ritual immolation of > those responsible for such things, something would have to be done > about them.
Think again. In case the "blurp" COULD have "%" in them...
> Another problem is the one of getting that text onto the console > in readable form. The only thing I can think of is have a two-stage > process where printk puts the data into the log buffer as > zero-terminated strings and then the console write routines format > it for display. They'd probably need their own buffers to do that.
Many of kernel's terse messages do need small encyclopedic articles to explain them. Present gobble-de-gook can not be made clear by merely supplying l10n translations of them to other gobble-de-gook.
Having ANCIENT STYLE numeric message code references will help users to find definitive explanations of them. "My machine said: '1-00234-0627 eth0 link down' and then it said: '1-00234-0626 eth0 link up'" (Where initial digit is severity qualifier, then subsystem id, and finally codepoint within subsystem. All within 32-bit integer.) (And probably base64-ish presentation in dmesg buffer, not base10..)
Some tool can produce HTML hyperlinked presentation of the messages with colour coding telling message classifications as text line backgrounds: green: info/chatty, can ignore blue: something notable happened (like linkstate jumps) yellow: something possibly serious red: something definitely serious
at the same time the tool can produce hyperlinks with user's language preferences (picked from environment/desktop parameters), and point all that to some site with e.g. a twiki to accumulate documentation. Vendors could also pull database snapshots into those tools.
That message-code style was introduced, when machines had very little memory, but style being in use from the dawn of computing is not a good reason to shun it. It really has benefits.
> > %s: went up in flames\n\0eth0\0\0 > > Is that "\n" an actual ASCII newline or the printk escape sequence?
The backslash is not "printk escape". It is C-string compilation notation.
/Matti Aarnio - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |