- If the APM BIOS fails to suspend the system after running the

suspend hooks, run the resume hooks to re-configure the system back
  to where it was.
This commit is contained in:
nate 1997-11-04 17:37:52 +00:00
parent 675448121b
commit b865ee4190
2 changed files with 12 additions and 6 deletions

View File

@ -15,7 +15,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
* $Id: apm.c,v 1.60 1997/09/21 21:33:10 gibbs Exp $
* $Id: apm.c,v 1.62 1997/10/23 04:18:49 nate Exp $
*/
#include <sys/param.h>
@ -400,8 +400,11 @@ apm_suspend(void)
if (sc->initialized) {
apm_execute_hook(hook[APM_HOOK_SUSPEND]);
apm_suspend_system();
apm_processevent();
if (apm_suspend_system() == 0)
apm_processevent();
else
// Failure, 'resume' the system again
apm_execute_hook(hook[APM_HOOK_RESUME]);
}
}

View File

@ -15,7 +15,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
* $Id: apm.c,v 1.60 1997/09/21 21:33:10 gibbs Exp $
* $Id: apm.c,v 1.62 1997/10/23 04:18:49 nate Exp $
*/
#include <sys/param.h>
@ -400,8 +400,11 @@ apm_suspend(void)
if (sc->initialized) {
apm_execute_hook(hook[APM_HOOK_SUSPEND]);
apm_suspend_system();
apm_processevent();
if (apm_suspend_system() == 0)
apm_processevent();
else
// Failure, 'resume' the system again
apm_execute_hook(hook[APM_HOOK_RESUME]);
}
}