Index: syscons.c =================================================================== RCS file: /home/ncvs/src/sys/dev/syscons/syscons.c,v retrieving revision 1.457 diff -u -r1.457 syscons.c --- syscons.c 24 Jan 2008 15:37:48 -0000 1.457 +++ syscons.c 7 Feb 2008 01:26:44 -0000 @@ -1065,17 +1065,9 @@ i = (*(int *)data == 0) ? scp->index : (*(int *)data - 1); if ((i < sc->first_vty) || (i >= sc->first_vty + sc->vtys)) return EINVAL; - s = spltty(); - error = sc_clean_up(sc->cur_scp); - splx(s); - if (error) - return error; - scp = sc_get_stat(SC_DEV(sc, i)); - if (scp == NULL) - return (ENXIO); - if (scp == scp->sc->cur_scp) + if (i == sc->cur_scp->index) return 0; - error = tsleep(&scp->smode, PZERO | PCATCH, "waitvt", 0); + error = tsleep(SC_DEV(sc, i), PZERO | PCATCH, "waitvt", 0); return error; case VT_GETACTIVE: /* get active vty # */ @@ -2335,7 +2327,7 @@ * be invoked at splhigh(). */ if (debugger == 0) - wakeup(&sc->new_scp->smode); + wakeup(SC_DEV(sc,next_scr)); splx(s); DPRINTF(5, ("switch done (new == old)\n")); return 0; @@ -2358,7 +2350,7 @@ /* wake up processes waiting for this vty */ if (debugger == 0) - wakeup(&sc->cur_scp->smode); + wakeup(SC_DEV(sc,next_scr)); /* wait for the controlling process to acknowledge, if necessary */ if (signal_vt_acq(sc->cur_scp)) { @@ -2384,7 +2376,7 @@ exchange_scr(sc); s = spltty(); /* sc->cur_scp == sc->new_scp */ - wakeup(&sc->cur_scp->smode); + wakeup(SC_DEV(sc,sc->cur_scp->index)); /* wait for the controlling process to acknowledge, if necessary */ if (!signal_vt_acq(sc->cur_scp)) {