Re: [PATCH printk v3 24/40] tty: nfcon: use console_is_registered()

From: Eero Tamminen
Date: Thu Nov 10 2022 - 12:59:14 EST


Hi,

On 10.11.2022 16.19, John Ogness wrote:
On 2022-11-10, Petr Mladek <pmladek@xxxxxxxx> wrote:
...
@@ -106,10 +106,8 @@ static int __init nf_debug_setup(char *arg)
return 0;
stderr_id = nf_get_id("NF_STDERR");
- if (stderr_id) {
- nf_console.flags |= CON_ENABLED;
+ if (stderr_id)
register_console(&nf_console);

My understanding is that this should enable the console
when debug=nfcon kernel parameter is used.

It is a non-standard way. This is why CON_ENABLED flag
has to be explicitly set.

Understood. I will add a comment explaining why CON_ENABLED is set here.

NatFeats is emulator feature. If you want to test the resulting kernel, you can use either Aranym or Hatari emulator.

Aranym NF docs are here:
https://github.com/aranym/aranym/wiki/natfeats-proposal

Hatari m68k linux docs are here:
https://hatari.tuxfamily.org/doc/m68k-linux.txt


- Eero