Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Introduce new option APM_NO_POWER_PRINT which disables printing
details: https://anonhg.NetBSD.org/src/rev/1c9cae51963f
branches: trunk
changeset: 476186:1c9cae51963f
user: itohy <itohy%NetBSD.org@localhost>
date: Thu Sep 09 03:52:21 1999 +0000
description:
Introduce new option APM_NO_POWER_PRINT which disables printing
power status on the console (if apmd is absent).
Some systems generate APM_POWER_CHANGE events too frequently (more then
once per minute), and printing the status makes single user operations
rather difficult.
diffstat:
share/man/man4/man4.i386/apm.4 | 7 ++++++-
sys/arch/i386/conf/files.i386 | 3 ++-
sys/arch/i386/i386/apm.c | 4 +++-
3 files changed, 11 insertions(+), 3 deletions(-)
diffs (63 lines):
diff -r bea57beee3ab -r 1c9cae51963f share/man/man4/man4.i386/apm.4
--- a/share/man/man4/man4.i386/apm.4 Thu Sep 09 01:36:30 1999 +0000
+++ b/share/man/man4/man4.i386/apm.4 Thu Sep 09 03:52:21 1999 +0000
@@ -24,7 +24,7 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $NetBSD: apm.4,v 1.5 1999/04/15 01:01:17 jtk Exp $
+.\" $NetBSD: apm.4,v 1.6 1999/09/09 03:52:22 itohy Exp $
.\"
.Dd May 18, 1996
.Dt APM 4 i386
@@ -71,6 +71,11 @@
Enable kernel printout of events received from the APM BIOS.
.It Dv APMCALLDEBUG
Enable kernel printout of every call to the APM BIOS (this is very noisy).
+.It Dv APM_NO_POWER_PRINT
+Do not print power state on console at
+.Dv APM_POWER_CHANGE
+events. (Some systems generate the events too frequently,
+and printing the status may disturb single-user operations.)
.El
.Pp
If no processes are holding open file descriptors to the APM device, the
diff -r bea57beee3ab -r 1c9cae51963f sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386 Thu Sep 09 01:36:30 1999 +0000
+++ b/sys/arch/i386/conf/files.i386 Thu Sep 09 03:52:21 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.i386,v 1.137 1999/08/17 21:31:57 drochner Exp $
+# $NetBSD: files.i386,v 1.138 1999/09/09 03:52:21 itohy Exp $
#
# new style config file for i386 architecture
#
@@ -11,6 +11,7 @@
# APM options
defopt opt_apm.h APM_DISABLE APM_FORCE_64K_SEGMENTS APM_NO_IDLE
APM_NO_STANDBY APM_V10_ONLY APM_NO_V12 APMDEBUG APMDEBUG_VALUE
+ APM_NO_POWER_PRINT
# Processor type options.
defopt opt_cputype.h I386_CPU I486_CPU I586_CPU I686_CPU
diff -r bea57beee3ab -r 1c9cae51963f sys/arch/i386/i386/apm.c
--- a/sys/arch/i386/i386/apm.c Thu Sep 09 01:36:30 1999 +0000
+++ b/sys/arch/i386/i386/apm.c Thu Sep 09 03:52:21 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apm.c,v 1.40 1999/08/17 19:04:24 drochner Exp $ */
+/* $NetBSD: apm.c,v 1.41 1999/09/09 03:52:21 itohy Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -478,10 +478,12 @@
case APM_POWER_CHANGE:
DPRINTF(APMDEBUG_EVENTS, ("apmev: power status change\n"));
error = apm_get_powstat(&nregs);
+#ifndef APM_NO_POWER_PRINT
/* only print if nobody is catching events. */
if (error == 0 &&
(sc->sc_flags & (SCFLAG_OREAD|SCFLAG_OWRITE)) == 0)
apm_power_print(sc, &nregs);
+#endif
apm_record_event(sc, regs->BX);
break;
Home |
Main Index |
Thread Index |
Old Index