According to Takeshi Nakayama <tn@catvmics.ne.jp>,
POW_ALARMSW seems always 1 on some models (at least XVI).
This commit is contained in:
parent
3a97e5ecd9
commit
077b93be1a
@ -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 @@ powattach(num)
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -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 @@ sethandler(void)
|
||||
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>,
|
||||
* 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;
|
||||
|
Loading…
Reference in New Issue
Block a user