Return the status of the APM support (enabled/disabled) with the
APM_GETINFO ioctl.
This commit is contained in:
parent
24f3908e49
commit
886c4a60dd
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user