lkml.org 
[lkml]   [2019]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] tty: Add NULL TTY driver
Date
On Fri, Apr 05, 2019 at 02:32:41PM +0200, Enrico Weigelt, metux IT consult wrote:
>On 05.04.19 11:00, Vincent Whitchurch wrote:
>> On Fri, Apr 05, 2019 at 10:39:43AM +0200, Enrico Weigelt, metux IT consult wrote:
>>> On 03.04.19 16:11, Vincent Whitchurch wrote:
>>>
>>>> Especially on embedded systems, it would be convenient to have a simple
>>>> way to disable the console (both for kernel and userspace) on a system
>>>> which normally uses it, to free up the UART for other things.
>>>
>>> Just symlinking to /dev/null does not work ?
>>
>> No, /dev/null does not support the TTY ioctls.
>
>hmm, wo (which programs) do you need, that really need them ?
>
>>> OTOH, if you're introducing a dummy console, wouldn't a ringbuffer that,
>>> can be read out later, a better option ?
>>
>> There is already a ttyprintk driver in mainline to send these messages
>> to the printk ring buffer if one is actually intrested in what is
>> written to the console. There's no option to enable it via console= in
>> mainline but I have a patch for that too.
>
>Great. IMHO, that would be the better way.

There are (embedded) cases where the kernel ring buffer is stored for
log inspection and all the logs that are *not* wanted there (like
interactive debug logs, some progress bar, etc) are send specifically to
/dev/console to avoid sending them to normal log store (as they are only
useful when debugging over console). In non-debug mode /dev/console
becomes /dev/null to speed things up.

I would personally benefit from Vincents patch. In fact I found this
thread because I was considering doing exactly the same for our system.

Krzysztof

\
 
 \ /
  Last update: 2019-04-11 15:05    [W:0.105 / U:4.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site