summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>1998-07-18 02:40:36 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>1998-07-18 02:40:36 +0000
commitf34a96fd754aa066dce4677f57e90fc20f2c5048 (patch)
treea09ab78767d24dc8fb2e0e82bae236c28a266ee6 /sys/arch/i386/include
parent8dd06895066a9e212477563f3144041f43d54f0d (diff)
add ioctl to apm to set message display to one of three states:
1) default: print out all messages. I made this the default so there would be no visable change to people who are used to what they have. 2) disable all messages. This mode is set by apmd when it starts up. I think it is reasonable for apmd to disable the driver display because it is collecting the data and syslogging it. Don't need to see it three and 4 times. 3) print percentage changes. For those who have a _noisy_ machine such as me but don't want to see lots and lots of messages I added a mode where the messages will only be displayed if the estimated battery percenge changes.
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/apmvar.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/i386/include/apmvar.h b/sys/arch/i386/include/apmvar.h
index 30286cbeb07..bdbd44d12ff 100644
--- a/sys/arch/i386/include/apmvar.h
+++ b/sys/arch/i386/include/apmvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmvar.h,v 1.4 1997/09/29 03:42:28 mickey Exp $ */
+/* $OpenBSD: apmvar.h,v 1.5 1998/07/18 02:40:35 marc Exp $ */
/*
* Copyright (c) 1995 John T. Kohl
@@ -217,6 +217,11 @@ struct apm_ctl {
#define APM_IOC_GETPOWER _IOR('A', 3, struct apm_power_info) /* fetch battery state */
#define APM_IOC_NEXTEVENT _IOR('A', 4, struct apm_event_info) /* fetch event */
#define APM_IOC_DEV_CTL _IOW('A', 5, struct apm_ctl) /* put device into mode */
+#define APM_IOC_PRN_CTL _IOW('A', 6, int ) /* driver power status msg */
+#define APM_PRINT_ON 0 /* driver power status displayed */
+#define APM_PRINT_OFF 1 /* driver power status not displayed */
+#define APM_PRINT_PCT 2 /* driver power status only displayed
+ if the percentage changes */
#ifdef _KERNEL
extern void apm_cpu_busy __P((void));