summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-03-13 00:42:56 +0000
committernate <nate@FreeBSD.org>1996-03-13 00:42:56 +0000
commit986c9f5c3a8f21824489bd78d88facebe50e9b3c (patch)
tree81636a89164ddabacf721ad14b1362f2206ff994
parent665e2fe6cf04ae69ecb9a21ec49c4194aec40f15 (diff)
downloadFreeBSD-src-986c9f5c3a8f21824489bd78d88facebe50e9b3c.zip
FreeBSD-src-986c9f5c3a8f21824489bd78d88facebe50e9b3c.tar.gz
Return the status of the APM support (enabled/disabled) with the
APM_GETINFO ioctl.
-rw-r--r--sys/i386/apm/apm.c4
-rw-r--r--sys/i386/bios/apm.c4
-rw-r--r--sys/i386/include/apm_bios.h5
3 files changed, 8 insertions, 5 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 5a82320..b6c39c4 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.25 1996/03/12 06:09:34 nate Exp $
+ * $Id: apm.c,v 1.26 1996/03/12 21:51:58 nate Exp $
*/
#include "apm.h"
@@ -461,6 +461,8 @@ apm_get_info(struct apm_softc *sc, apm_info_t aip)
aip->ai_batt_life = ecx & 0xff;
aip->ai_major = (u_int)sc->majorversion;
aip->ai_minor = (u_int)sc->minorversion;
+ aip->ai_status = (u_int)sc->active;
+
return 0;
}
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c
index 5a82320..b6c39c4 100644
--- a/sys/i386/bios/apm.c
+++ b/sys/i386/bios/apm.c
@@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.25 1996/03/12 06:09:34 nate Exp $
+ * $Id: apm.c,v 1.26 1996/03/12 21:51:58 nate Exp $
*/
#include "apm.h"
@@ -461,6 +461,8 @@ apm_get_info(struct apm_softc *sc, apm_info_t aip)
aip->ai_batt_life = ecx & 0xff;
aip->ai_major = (u_int)sc->majorversion;
aip->ai_minor = (u_int)sc->minorversion;
+ aip->ai_status = (u_int)sc->active;
+
return 0;
}
diff --git a/sys/i386/include/apm_bios.h b/sys/i386/include/apm_bios.h
index fbaa8a4..6e2e03c 100644
--- a/sys/i386/include/apm_bios.h
+++ b/sys/i386/include/apm_bios.h
@@ -12,7 +12,7 @@
*
* Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm_bios.h,v 1.7 1995/12/25 07:38:47 bde Exp $
+ * $Id: apm_bios.h,v 1.8 1996/03/12 05:51:35 nate Exp $
*/
#ifndef _MACHINE_APM_BIOS_H_
@@ -176,9 +176,9 @@ typedef struct apm_info {
u_int ai_acline; /* AC line status */
u_int ai_batt_stat; /* Battery status */
u_int ai_batt_life; /* Remaining battery life */
+ u_int ai_status; /* Status of APM support (enabled/disabled) */
} *apm_info_t;
-#ifdef __FreeBSD__
#define APMIO_SUSPEND _IO('P', 1)
#define APMIO_GETINFO _IOR('P', 2, struct apm_info)
#define APMIO_ENABLE _IO('P', 5)
@@ -186,7 +186,6 @@ typedef struct apm_info {
#define APMIO_HALTCPU _IO('P', 7)
#define APMIO_NOTHALTCPU _IO('P', 8)
#define APMIO_DISPLAYOFF _IO('P', 9)
-#endif /* __FreeBSD__ */
#endif /* !ASSEMBLER && !INITIALIZER */
OpenPOWER on IntegriCloud