Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/news68k/news68k space -> TAB
details: https://anonhg.NetBSD.org/src/rev/c8c8ca7ed495
branches: trunk
changeset: 515969:c8c8ca7ed495
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Oct 11 14:01:36 2001 +0000
description:
space -> TAB
diffstat:
sys/arch/news68k/news68k/clock.c | 70 +++++++++++++++++++--------------------
1 files changed, 34 insertions(+), 36 deletions(-)
diffs (96 lines):
diff -r 39d68a3714a7 -r c8c8ca7ed495 sys/arch/news68k/news68k/clock.c
--- a/sys/arch/news68k/news68k/clock.c Thu Oct 11 12:05:39 2001 +0000
+++ b/sys/arch/news68k/news68k/clock.c Thu Oct 11 14:01:36 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.6 2001/07/07 15:27:21 tsutsui Exp $ */
+/* $NetBSD: clock.c,v 1.7 2001/10/11 14:01:36 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -83,7 +83,6 @@
cpu_initclocks_hook = initfunc;
}
-
/*
* Set up the real-time and statistics clocks. Leave stathz 0 only
* if no alternative timer is available.
@@ -164,45 +163,44 @@
inittodr(base)
time_t base;
{
- int badbase = 0, waszero = (base == 0);
+ int badbase = 0, waszero = (base == 0);
- if (base < 5 * SECYR) {
- /*
- * If base is 0, assume filesystem time is just unknown
- * in stead of preposterous. Don't bark.
- */
- if (base != 0)
- printf("WARNING: preposterous time in file system\n");
- /* not going to use it anyway, if the chip is readable */
- /* 1991/07/01 12:00:00 */
- base = 21*SECYR + 186*SECDAY + SECDAY/2;
- badbase = 1;
- }
+ if (base < 5 * SECYR) {
+ /*
+ * If base is 0, assume filesystem time is just unknown
+ * in stead of preposterous. Don't bark.
+ */
+ if (base != 0)
+ printf("WARNING: preposterous time in file system\n");
+ /* not going to use it anyway, if the chip is readable */
+ /* 1991/07/01 12:00:00 */
+ base = 21*SECYR + 186*SECDAY + SECDAY/2;
+ badbase = 1;
+ }
- if (todr_gettime(todr_handle, (struct timeval *)&time) != 0 ||
- time.tv_sec == 0) {
- printf("WARNING: bad date in battery clock");
- /*
- * Believe the time in the file system for lack of
- * anything better, resetting the clock.
- */
- time.tv_sec = base;
- if (!badbase)
- resettodr();
- } else {
- int deltat = time.tv_sec - base;
+ if (todr_gettime(todr_handle, (struct timeval *)&time) != 0 ||
+ time.tv_sec == 0) {
+ printf("WARNING: bad date in battery clock");
+ /*
+ * Believe the time in the file system for lack of
+ * anything better, resetting the clock.
+ */
+ time.tv_sec = base;
+ if (!badbase)
+ resettodr();
+ } else {
+ int deltat = time.tv_sec - base;
- if (deltat < 0)
- deltat = -deltat;
- if (waszero || deltat < 2 * SECDAY)
- return;
- printf("WARNING: clock %s %d days",
- time.tv_sec < base ? "lost" : "gained", deltat / SECDAY);
- }
- printf(" -- CHECK AND RESET THE DATE!\n");
+ if (deltat < 0)
+ deltat = -deltat;
+ if (waszero || deltat < 2 * SECDAY)
+ return;
+ printf("WARNING: clock %s %d days",
+ time.tv_sec < base ? "lost" : "gained", deltat / SECDAY);
+ }
+ printf(" -- CHECK AND RESET THE DATE!\n");
}
-
/*
* Reset the clock based on the current time.
* Used when the current clock is preposterous, when the time is changed,
Home |
Main Index |
Thread Index |
Old Index