diff options
author | nate <nate@FreeBSD.org> | 1997-11-04 17:37:52 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1997-11-04 17:37:52 +0000 |
commit | b865ee41909eeb0afa6e928b539c5954075ea33b (patch) | |
tree | e64ecc61960e3c3a7329e8987c3faf3991ca7975 /sys/i386/bios | |
parent | 675448121bb1a3eb2a380604e67a18442878c5c4 (diff) | |
download | FreeBSD-src-b865ee41909eeb0afa6e928b539c5954075ea33b.zip FreeBSD-src-b865ee41909eeb0afa6e928b539c5954075ea33b.tar.gz |
- 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.
Diffstat (limited to 'sys/i386/bios')
-rw-r--r-- | sys/i386/bios/apm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 4fe3dd2..8278985 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -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]); } } |