Re: [PATCH] detour TTY driver - now ttyprintk

From: Kay Sievers
Date: Wed Aug 25 2010 - 03:48:44 EST


On Wed, Aug 25, 2010 at 09:40, Kay Sievers <kay.sievers@xxxxxxxx> wrote:
> On Wed, Aug 25, 2010 at 01:12, Greg KH <gregkh@xxxxxxx> wrote:
>> On Wed, Aug 25, 2010 at 12:22:21AM +0100, Alan Cox wrote:
>>> > No, it does cover that. ÂYou should be able to do that with a simple
>>> > console redirection to /dev/kmsg ÂWhat happened when you tried to do
>>> > that?
>>>
>>> stty: standard input: Inappropriate ioctl for device
>>
>> Kay, how does systemd handle the kmsg console redirection?
>
> Systemd does not steal the console, this is done by plymouth, in the
> same way blogd can do that. It uses a pty and rewrites the messages.
>
> Systemd does pass syslog to the kernel buffer during early boot. Init
> provides /dev/log. With systemd, the started services usually don't
> get the console connected, but use syslog anyway or the stdout/err
> gets redirected to syslog.
>
> With systemd the console is not too useful because we start everything
> in parallel. If all the services would put out stuff there like sysv
> did, it would look like a real mess.

Or isn't that what you asked for? We just write the stuff that arrives
at syslog to /dev/kmsg to put things in the kernel log buffer.

Also initrds are usually using
exec < /dev/console > /dev/kmsg 2>&1
to get stuff directly to the kernel buffer.

What does /dev/ttyprintk offer on top of that?

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/