From f34a96fd754aa066dce4677f57e90fc20f2c5048 Mon Sep 17 00:00:00 2001 From: Marco S Hyman Date: Sat, 18 Jul 1998 02:40:36 +0000 Subject: 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. --- sys/arch/i386/include/apmvar.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386/include') 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)); -- cgit v1.2.3