LWN.net Logo

Reviving linux-tiny

Reviving linux-tiny

Posted Sep 27, 2007 9:01 UTC (Thu) by filipjoelsson (subscriber, #2622)
In reply to: Reviving linux-tiny by jengelh
Parent article: Reviving linux-tiny

So put a translator in userland!

Let "make install" put a printk.map-2.6.24 in /boot for vmlinuz-2.6.24 - and syslog/dmesg could grab the relevant message and make the switch. For embedded systems you could trim the lower levels of interest, zip the file, or whatever. You should get the error code only if the relevant string isn't found - and that should happen only if you have actively chosen to trim that class of printks (or printks alltogether - but in that case, and error code would be an improvent on no-message-at-all, right?).

This leaves the problem of getting the message out in case of a kernel panic - so maybe a subset of strings still need to reside in the kernel. But I don't believe all of it is needed there.

I agree we don't need messages like "Error 1026" and lengthy MSDN searches to uncover that it means "Memory corruption" - but bloating the RAM with error strings isn't the only alternative.

Seriously, I know putting too much stuff in userland is frowned upon - but putting error translation there looks way better than putting filesystems in userland.


(Log in to post comments)

Reviving linux-tiny

Posted Sep 27, 2007 13:34 UTC (Thu) by nix (subscriber, #2304) [Link]

And when userspace is dead, or if the machine dies before the necessary daemon is running, now the poor damn users are just hit with gibberish error codes again... just when natural-language messages might help them climb out of the mire.

(Also, what about the printf()-style format substitutions printk() allows? An error ID scheme provides no space for that at all. There's a reason the old catgets scheme is unused except by masochists.)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds