Darren J Moffat wrote:
> Riny Qian wrote:
>> BTW, kernel messages will always go to the current active virtual
> Thats what I said I didn't want. There should in my opinion only be one
> /dev/console (modulo what you do with consadm(1m). This project
> shouldn't in my opinion be about virtualising /dev/console but instead
> about proving additional tty's that are available from the machines
> primary keyboard mouse and screen; they are accessed via a magic key
> sequence. I believe that is what the expectation is on other platforms.
Kernel messages output (e.g. via cmn_err) is different with user level
messages output via /dev/console.
At user level, firstly you echo "a large file" > /dev/console, the
content of that file will go to current virtual console (e.g. /dev/vt1).
Then your switch to another virtual console (e.g. /dev/vt2), then you
echo "another large file" > /dev/console, the content of it will still
go to current virtual console, that is, /dev/vt2.
In kernel, each time cmn_err is called, the output will go to current
virtual console. There is no way for console subsystem to combine or
distinguish different cmn_errs.
Or perhaps we can still take the /dev/console policy of older Solaris
(e.g. 2.5) with virtual console functionality, under that, /dev/console
was the primary console, and VT just provided additional virtual console
terminals. Everything that redirects to /dev/console will not go to
the current virtual console. Even on such older Solaris, kernel messages
still always went through the current virtual console exactly as what we