Re: [PATCH] printk: handle blank console arguments passed in.

From: Sergey Senozhatsky
Date: Wed Oct 07 2020 - 12:29:49 EST


On (20/10/07 08:57), Guenter Roeck wrote:
> On 10/7/20 5:30 AM, Sergey Senozhatsky wrote:

[..]

> I can see to options: Link /dev/console to /dev/null if there is no console,
> or do something like
>
> if (IS_ERR(file)) {
> pr_warn("Warning: unable to open an initial console.\n");
> file = filp_open("/dev/null", O_RDWR, 0);
> if (IS_ERR(file))
> return;
> }

As far as I can tell, /dev/null does not exist yet on this stage
(at least not in my system). But generally the idea looks interesting.

-ss