- 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:
parent
675448121b
commit
b865ee4190
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user