APM calls inittodr(0) which is stupid, but at least stop setting the

clock back to when Dennis had a good idea.
This commit is contained in:
Poul-Henning Kamp 1998-01-28 10:41:33 +00:00
parent ef65ade83a
commit 53dd848c82
5 changed files with 35 additions and 25 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.106 1997/12/28 13:36:07 phk Exp $
* $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
*/
/*
@ -730,10 +730,12 @@ inittodr(time_t base)
int year, month;
int y, m, s;
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
if (base) {
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
}
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.106 1997/12/28 13:36:07 phk Exp $
* $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
*/
/*
@ -730,10 +730,12 @@ inittodr(time_t base)
int year, month;
int y, m, s;
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
if (base) {
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
}
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.106 1997/12/28 13:36:07 phk Exp $
* $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
*/
/*
@ -730,10 +730,12 @@ inittodr(time_t base)
int year, month;
int y, m, s;
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
if (base) {
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
}
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.106 1997/12/28 13:36:07 phk Exp $
* $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
*/
/*
@ -730,10 +730,12 @@ inittodr(time_t base)
int year, month;
int y, m, s;
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
if (base) {
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
}
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.106 1997/12/28 13:36:07 phk Exp $
* $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
*/
/*
@ -730,10 +730,12 @@ inittodr(time_t base)
int year, month;
int y, m, s;
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
if (base) {
s = splclock();
time.tv_sec = base;
time.tv_usec = 0;
splx(s);
}
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))