Let the first device suspend and the last device resume syscons(4).
This commit is contained in:
parent
38eeaac17b
commit
cb881f8f8e
@ -116,10 +116,10 @@ scsuspend(device_t dev)
|
||||
|
||||
sc = &main_softc;
|
||||
|
||||
if (sc->cur_scp == NULL || sc->suspend_in_progress)
|
||||
if (sc->cur_scp == NULL)
|
||||
return (0);
|
||||
|
||||
if (!sc_no_suspend_vtswitch) {
|
||||
if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch) {
|
||||
sc_cur_scr = sc->cur_scp->index;
|
||||
do {
|
||||
sc_switch_scr(sc, 0);
|
||||
@ -128,8 +128,7 @@ scsuspend(device_t dev)
|
||||
pause("scsuspend", hz);
|
||||
} while (retry--);
|
||||
}
|
||||
|
||||
sc->suspend_in_progress = TRUE;
|
||||
sc->suspend_in_progress++;
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -141,12 +140,8 @@ scresume(device_t dev)
|
||||
|
||||
sc = &main_softc;
|
||||
|
||||
if (!sc->suspend_in_progress)
|
||||
return (0);
|
||||
|
||||
sc->suspend_in_progress = FALSE;
|
||||
|
||||
if (!sc_no_suspend_vtswitch)
|
||||
sc->suspend_in_progress--;
|
||||
if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch)
|
||||
sc_switch_scr(sc, sc_cur_scr);
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user