Rearrangements needed for syscons(4) to be used as a console device
on architectures that need to call cninit() before the machine is
ready to support mutexes (required by make_dev()).
- Remove make_dev() call from scinit() when flags indicate
unit is the system console, rely on sc_attach_unit() to handle it.
- When trying to access current screen's status (scr_stat
structure) use the static one provided for the initial system console if no dev_t is available.
- When calling make_dev() in sc_attach_unit() catch special
case of system's initial console and set up dev_t structure to include pointer to console's scr_stat struct.
Reviewed by: marcel
Tested by: marcel, grehan (ppc), others on current@
Approved by: rwatson (mentor)