svn commit: r196506 - in head/sys: kern sys

Bruce Evans brde at
Mon Aug 24 13:54:07 UTC 2009

On Mon, 24 Aug 2009, Ed Schouten wrote:

> * Bruce Evans <brde at> wrote:
>> CONS_DRIVER() was a good interface, unlike CONSOLE_DRIVER().  Removing it
>> completes the bitrot in the support for cn_dbctl, and completes removal
>> of cn_checkc's good name at the driver level.
>> cn_dbctl is still needed to unbreak sysctl's support for ddb (see db_main.c
>>, which depends on cn_dbctl's infrastructure not having rotted) and
>> can be used to unbreak polled i/o in all console drivers (not just in ddb
>> mode -- it should have been named cn_ioctl) (see other mail).
>> The higher level cngetc() and cncheckc() are still correctly named, now
>> fully inconsistently with the driver level.
> Well, there are lots of things broken in the current implementation.
> Just take a look at how the cn_term is entirely commented out, only
> because syscons can't handle it.
> The only thing I tried to do with those changes, is remove dead code.
> If someone comes up with patches to properly restore these features, I'd
> be more than happy to commit them to SVN.

There are some working patches in old versions (e.g., cn_dbctl last worked
for syscons in RELENG_6, where I fixed it.  The fix was relatively easy
because none of the infrastructure or syscons support code had been

I didn't even notice that cn_term was commented out.  That dates from
the multiple console changes in 2001, which exposed many problems.
For syscons, the problem with cn_term seems to be that cn_term was
only intended to be used for switching console at boot time.  This
is a harsh environment (can't malloc()/free()), but cn_term was
implemented mainly for syscons so the switch then should have been


More information about the svn-src-all mailing list