Page MenuHomeFreeBSD

kern: console: make /dev/console backing console more predictable
Needs ReviewPublic

Authored by kevans on Jan 5 2024, 6:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 18 2025, 4:50 PM
Unknown Object (File)
Nov 18 2025, 11:17 AM
Unknown Object (File)
Nov 18 2025, 3:36 AM
Unknown Object (File)
Nov 16 2025, 4:33 PM
Unknown Object (File)
Nov 9 2025, 12:06 AM
Unknown Object (File)
Oct 26 2025, 4:18 AM
Unknown Object (File)
Oct 25 2025, 2:51 AM
Unknown Object (File)
Oct 21 2025, 2:37 AM
Subscribers
None

Details

Reviewers
imp
Summary

Specifically, altering the console list with conscontrol has some weird
behavior:

  1. If you remove the first configured console, /dev/console will become unconfigured
  2. Any console added becomes the /dev/console

In a multicons situation, #1 is clearly a bug and #2 is perhaps slightly
less clear. If we have ttyu0, ttyv0, then it seems obvious that one
would want ttyv0 to take over the console if ttyu0 is removed. If we
add ttyu0 back in, then it's debatable whether it should take over the
console or not.

Fix it now to make the /dev/console selection more FIFO-ish, with
respect to how conscontrol affects it. A primary verb for
conscontrol(8) might be a good addition.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 55252
Build 52141: arc lint + arc unit

Event Timeline

kevans requested review of this revision.Jan 5 2024, 6:19 AM
kevans created this revision.