Re: [patch] printk from userspace

H. Peter Anvin
2002-08-14T04:39:15Z

Benjamin LaHaise wrote:
> On Tue, Aug 13, 2002 at 09:26:45PM -0700, Linus Torvalds wrote:
>
>>That said, I like the notion. I've always hated the fact that all the
>>boot-time messages get lost, simply because syslogd hadn't started, and
>>as a result things like fsck ran without any sign afterwards. The kernel
>>log approach saves it all in one place.
>>
>>But /dev/console just sounds potentially _too_ noisy.
>
>
> /dev/kmsg was another suggestion for the name. But please revert the
> yet-another-syscall variant -- having a duplicate way for logging that
> doesn't work with stdio just seems sick to me (sys_syslog should die).
> Something like the following untested code is much better.
>

a) /dev/kmsg bettwe be S_IRUSR|S_IWUSR... reading /{proc,dev}/kmsg
should drain the ring buffer.

b) Hook up the /proc/kmsg read to this thing.

It really needs to be a /dev node, not a /proc node; procfs is likely
*not* to be mounted; however, manifesting a /dev node is easy enough.

-hpa