Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k According to Takeshi Nakayama <tn%catvmics.ne@localhost....
details: https://anonhg.NetBSD.org/src/rev/84f159596dc4
branches: trunk
changeset: 482737:84f159596dc4
user: minoura <minoura%NetBSD.org@localhost>
date: Sun Feb 20 16:18:51 2000 +0000
description:
According to Takeshi Nakayama <tn%catvmics.ne.jp@localhost>,
POW_ALARMSW seems always 1 on some models (at least XVI).
diffstat:
sys/arch/x68k/dev/pow.c | 14 ++++++++++----
sys/arch/x68k/usr.sbin/poffd/poffd.c | 13 +++++++++++--
2 files changed, 21 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r 5f3e9690e457 -r 84f159596dc4 sys/arch/x68k/dev/pow.c
--- a/sys/arch/x68k/dev/pow.c Sun Feb 20 15:45:33 2000 +0000
+++ b/sys/arch/x68k/dev/pow.c Sun Feb 20 16:18:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pow.c,v 1.7 1998/08/04 16:07:53 minoura Exp $ */
+/* $NetBSD: pow.c,v 1.8 2000/02/20 16:18:51 minoura Exp $ */
/*
* Copyright (c) 1995 MINOURA Makoto.
@@ -92,14 +92,20 @@
}
printf("pow%d: started by ", minor);
- if ((sw & POW_ALARMSW) && sramtop[0x26] == 0)
- printf ("RTC alarm.\n");
- else if (sw & POW_EXTERNALSW)
+ if (sw & POW_EXTERNALSW)
printf ("external power switch.\n");
else if (sw & POW_FRONTSW)
printf ("front power switch.\n");
+ /* XXX: I don't know why POW_ALARMSW should not be checked */
+#if 0
+ else if ((sw & POW_ALARMSW) && sramtop[0x26] == 0)
+ printf ("RTC alarm.\n");
else
printf ("???.\n");
+#else
+ else
+ printf ("RTC alarm.\n");
+#endif
}
shutdownhook_establish(pow_check_switch, 0);
diff -r 5f3e9690e457 -r 84f159596dc4 sys/arch/x68k/usr.sbin/poffd/poffd.c
--- a/sys/arch/x68k/usr.sbin/poffd/poffd.c Sun Feb 20 15:45:33 2000 +0000
+++ b/sys/arch/x68k/usr.sbin/poffd/poffd.c Sun Feb 20 16:18:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: poffd.c,v 1.2 1998/01/05 20:52:35 perry Exp $ */
+/* $NetBSD: poffd.c,v 1.3 2000/02/20 16:18:56 minoura Exp $ */
/*
* Copyright (c) 1995 MINOURA Makoto.
* All rights reserved.
@@ -148,7 +148,16 @@
sw = powerinfo.pow_switch_boottime;
oldsw = powerinfo.pow_switch_current & 6;
- if (sw & POW_ALARMSW) {
+#if 0
+ if (sw & POW_ALARMSW)
+#else
+ /*
+ * According to Takeshi Nakayama <tn%catvmics.ne.jp@localhost>,
+ * POW_ALARMSW seems to be always 1 on some models (at least XVI).
+ */
+ if ((sw & (POW_EXTERNALSW|POW_FRONTSW)) == 0)
+#endif
+ {
struct x68k_alarminfo alarminfo;
int secs;
time_t boottime, offtime, now;
Home |
Main Index |
Thread Index |
Old Index