Re: console output duplicated when registering additional consoles
From: Jonathan Richardson
Date: Tue Nov 19 2019 - 13:46:39 EST
> > Thanks. It also needs to be cleared when the second console driver is
> > registered (of the same type, boot or normal)
>
> The second 'normal' console can be, for instance, netcon - it's sort
> of OK to have CON_PRINTBUFFER tty and CON_PRINTBUFFER netcon consoles.
OK I missed that case.
>
> Maybe
>
> > not just when a normal con replaces a bootconsole. A simple way of
> > avoiding the problem I'm seeing is to not even set the CON_PRINTBUFFER
> > flag on my consoles.
>
> This is up to the console driver to decide.
>
> > It skips the replay and the output on all consoles looks fine. The flag
> > is only used by register_console(), although I don't think that is the
> > intended usage? There are no console drivers that do this.
>
> Not sure I'm following. There are consoles that want all logbuf messages
> once those consoles are available.
I meant mine would be the only driver that didn't set CON_PRINTBUFFER.
Thanks for clarifying why it would be set. I guess what I didn't
understand is why are all the consoles updated (potentially) when a
new console is registered. As I mentioned before I can not set
CON_PRINTBUFFER to avoid the issue but it's probably not what I want.
I would possibly lose some of the log I guess if there was something
in the buffer during registration of the new console. So I tried the
patch but the issue remains as I originally described.
Thanks,
Jon