diff options
| author | Kazutaka YOKOTA <yokota@FreeBSD.org> | 2001-07-16 05:21:24 +0000 |
|---|---|---|
| committer | Kazutaka YOKOTA <yokota@FreeBSD.org> | 2001-07-16 05:21:24 +0000 |
| commit | 8a3b34897083fc28742a10e9900a7511beaccd8e (patch) | |
| tree | 38c1e5b70de601aac8ae9f48cdc104d04dae5038 /sys/dev/syscons/syscons.c | |
| parent | 728c5aefc637eb51a944fd633829c5529e4212a8 (diff) | |
Notes
Diffstat (limited to 'sys/dev/syscons/syscons.c')
| -rw-r--r-- | sys/dev/syscons/syscons.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 7fda42fd3b6d..5b964e6a0b0e 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -474,7 +474,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p) ttychars(tp); /* Use the current setting of the <-- key as default VERASE. */ /* If the Delete key is preferable, an stty is necessary */ - if (sc != NULL) { + if (sc->kbd != NULL) { key.keynum = KEYCODE_BS; kbd_ioctl(sc->kbd, GIO_KEYMAPENT, (caddr_t)&key); tp->t_cc[VERASE] = key.key.map[0]; @@ -2217,6 +2217,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) /* * Is the wanted vty open? Don't allow switching to a closed vty. + * If we are in DDB, don't switch to a vty in the VT_PROCESS mode. * Note that we always allow the user to switch to the kernel * console even if it is closed. */ @@ -2228,6 +2229,11 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) DPRINTF(5, ("error 2, requested vty isn't open!\n")); return EINVAL; } + if ((debugger > 0) && (SC_STAT(tp->t_dev)->smode.mode == VT_PROCESS)) { + splx(s); + DPRINTF(5, ("error 3, requested vty is in the VT_PROCESS mode\n")); + return EINVAL; + } } /* this is the start of vty switching process... */ |
