GC the cn_dbctl_t hook for consoles, it is unused.

This used to make syscons switch to vty0 when we entered DDB but this
was lost in the KDB shuffle.  We may want to bring it back down the road
but it should be done by calling cn_init_t/cn_term_t instead, possibly
with a flag argument saying "Debugger!"
This commit is contained in:
Poul-Henning Kamp 2006-05-26 10:24:00 +00:00
parent 9806934e47
commit 16b1613a31
4 changed files with 3 additions and 64 deletions

View File

@ -222,11 +222,10 @@ static cn_init_t sccninit;
static cn_getc_t sccngetc;
static cn_checkc_t sccncheckc;
static cn_putc_t sccnputc;
static cn_dbctl_t sccndbctl;
static cn_term_t sccnterm;
CONS_DRIVER(sc, sccnprobe, sccninit, sccnterm, sccngetc, sccncheckc, sccnputc,
sccndbctl);
NULL);
static d_open_t scopen;
static d_close_t scclose;
@ -1511,37 +1510,6 @@ sccncheckc(struct consdev *cd)
return sccngetch(SCGETC_NONBLOCK);
}
static void
sccndbctl(struct consdev *cd, int on)
{
/* assert(sc_console_unit >= 0) */
/* try to switch to the kernel console screen */
if (on && debugger == 0) {
/*
* TRY to make sure the screen saver is stopped,
* and the screen is updated before switching to
* the vty0.
*/
scrn_timer(NULL);
if (!cold
&& sc_console->sc->cur_scp->smode.mode == VT_AUTO
&& sc_console->smode.mode == VT_AUTO) {
sc_console->sc->cur_scp->status |= MOUSE_HIDDEN;
++debugger; /* XXX */
#ifdef DDB
/* unlock vty switching */
sc_console->sc->flags &= ~SC_SCRN_VTYLOCK;
#endif
sc_switch_scr(sc_console->sc, sc_console->index);
--debugger; /* XXX */
}
}
if (on)
++debugger;
else
--debugger;
}
static int
sccngetch(int flags)
{

View File

@ -131,7 +131,6 @@ static cn_term_t zs_cnterm;
static cn_getc_t zs_cngetc;
static cn_checkc_t zs_cncheckc;
static cn_putc_t zs_cnputc;
static cn_dbctl_t zs_cndbctl;
static int zstty_cngetc(struct zstty_softc *sc);
static int zstty_cncheckc(struct zstty_softc *sc);
@ -157,7 +156,7 @@ static struct cdevsw zstty_cdevsw = {
static struct zstty_softc *zstty_cons;
CONS_DRIVER(zs, zs_cnprobe, zs_cninit, zs_cnterm, zs_cngetc, zs_cncheckc,
zs_cnputc, zs_cndbctl);
zs_cnputc, NULL);
int
zs_probe(device_t dev)
@ -859,11 +858,6 @@ zs_cnputc(struct consdev *cn, int c)
zstty_cnputc(sc, c);
}
static void
zs_cndbctl(struct consdev *cn, int c)
{
}
static void
zstty_cnopen(struct zstty_softc *sc)
{

View File

@ -635,25 +635,6 @@ cnputc(int c)
}
}
void
cndbctl(int on)
{
struct cn_device *cnd;
struct consdev *cn;
static int refcount;
if (!on)
refcount--;
if (refcount == 0)
STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
cn = cnd->cnd_cn;
if (cn->cn_dbctl != NULL)
cn->cn_dbctl(cn, on);
}
if (on)
refcount++;
}
static int consmsgbuf_size = 8192;
SYSCTL_INT(_kern, OID_AUTO, consmsgbuf_size, CTLFLAG_RW, &consmsgbuf_size, 0,
"");

View File

@ -45,7 +45,6 @@ typedef void cn_term_t(struct consdev *);
typedef int cn_getc_t(struct consdev *);
typedef int cn_checkc_t(struct consdev *);
typedef void cn_putc_t(struct consdev *, int);
typedef void cn_dbctl_t(struct consdev *, int);
struct consdev {
cn_probe_t *cn_probe;
@ -60,8 +59,6 @@ struct consdev {
/* kernel "return char if available" interface */
cn_putc_t *cn_putc;
/* kernel putchar interface */
cn_dbctl_t *cn_dbctl;
/* debugger control interface */
struct tty *cn_tp; /* tty structure for console device */
short cn_pri; /* pecking order; the higher the better */
void *cn_arg; /* drivers method argument */
@ -85,7 +82,7 @@ struct consdev {
#define CONS_DRIVER(name, probe, init, term, getc, checkc, putc, dbctl) \
static struct consdev name##_consdev = { \
probe, init, term, getc, checkc, putc, dbctl \
probe, init, term, getc, checkc, putc \
}; \
DATA_SET(cons_set, name##_consdev)
@ -98,7 +95,6 @@ void cnremove(struct consdev *);
void cnselect(struct consdev *);
int cncheckc(void);
int cngetc(void);
void cndbctl(int);
void cnputc(int);
int cnunavailable(void);