Re: [PATCH] char: ttyprintk: register console

From: Greg Kroah-Hartman
Date: Mon Feb 21 2022 - 13:31:07 EST


On Tue, Feb 15, 2022 at 03:17:49PM +0100, Vincent Whitchurch wrote:
> Register a console in the ttyprintk driver so that it can be selected
> for /dev/console with console=ttyprintk on the kernel command line,
> similar to other console drivers.
>
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@xxxxxxxx>
> ---
> drivers/char/Kconfig | 3 ++-
> drivers/char/ttyprintk.c | 16 ++++++++++++++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index 740811893c57..c553a8a50d03 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -18,7 +18,8 @@ config TTY_PRINTK
> The feature is useful to inline user messages with kernel
> messages.
> In order to use this feature, you should output user messages
> - to /dev/ttyprintk or redirect console to this TTY.
> + to /dev/ttyprintk or redirect console to this TTY, or boot
> + the kernel with console=ttyprintk.

Why do you want to use this tty device as a console? What benifit does
that provide?

thanks,

greg k-h