diff options
author | wollman <wollman@FreeBSD.org> | 1997-06-15 02:03:03 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1997-06-15 02:03:03 +0000 |
commit | d3793afec065771a51529f173ee6a24d08383340 (patch) | |
tree | 1ddaf487872942d89c2744421be615ce4d3799db /sys/i386/apm | |
parent | a884e3c1fc9fb8da0c715cdf19f919a481b7c4f3 (diff) | |
download | FreeBSD-src-d3793afec065771a51529f173ee6a24d08383340.zip FreeBSD-src-d3793afec065771a51529f173ee6a24d08383340.tar.gz |
When APM is configured, turn off the power when halting for good.
Diffstat (limited to 'sys/i386/apm')
-rw-r--r-- | sys/i386/apm/apm.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index c39be9d..ad1db6d 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.55 1997/03/29 11:06:37 phk Exp $ + * $Id: apm.c,v 1.56 1997/03/30 09:08:00 phk Exp $ */ #include <sys/param.h> @@ -223,6 +223,19 @@ apm_display(int newstate) return 0; } +/* + * Turn off the entire system. + */ +void +apm_display(void) +{ + u_long eax, ebx, ecx; + + eax = (APM_BIOS << 8) | APM_SETPWSTATE; + ebx = PMDV_ALLDEV; + ecx = PMST_OFF; + apm_int(&eax, &ebx, &ecx); +} /* APM Battery low handler */ static void |