summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2006-10-02 18:23:37 +0000
committerphk <phk@FreeBSD.org>2006-10-02 18:23:37 +0000
commit638e020bc6857faa5fda80000dcd6c68e81077b3 (patch)
tree3489b6aebb6a369a6ddad98553ec18fdc627975e /sys/fs/nwfs
parent5d888a06551915d7b826dd6177fc33ea8deb877d (diff)
downloadFreeBSD-src-638e020bc6857faa5fda80000dcd6c68e81077b3.zip
FreeBSD-src-638e020bc6857faa5fda80000dcd6c68e81077b3.tar.gz
Use utc_offset() where applicable, and hide the internals of it
as static variables.
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_subr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/fs/nwfs/nwfs_subr.c b/sys/fs/nwfs/nwfs_subr.c
index eabcc5f..e5da24a 100644
--- a/sys/fs/nwfs/nwfs_subr.c
+++ b/sys/fs/nwfs/nwfs_subr.c
@@ -37,7 +37,7 @@
#include <sys/clock.h>
#include <sys/lockmgr.h>
#include <sys/malloc.h>
-#include <machine/clock.h>
+#include <sys/clock.h>
#include <sys/time.h>
#include <netncp/ncp.h>
@@ -598,8 +598,7 @@ ncp_unix2dostime(tsp, tzoff, ddp, dtp, dhp)
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
- t = tsp->tv_sec - tzoff * 60 - tz_minuteswest * 60 -
- (wall_cmos_clock ? adjkerntz : 0);
+ t = tsp->tv_sec - tzoff * 60 - utc_offset();
t &= ~1;
if (lasttime != t) {
lasttime = t;
@@ -708,7 +707,6 @@ ncp_dos2unixtime(dd, dt, dh, tzoff, tsp)
days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1;
lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980;
}
- tsp->tv_sec = seconds + lastseconds + tz_minuteswest * 60 +
- tzoff * 60 + (wall_cmos_clock ? adjkerntz : 0);
+ tsp->tv_sec = seconds + lastseconds + tzoff * 60 + utc_offset();
tsp->tv_nsec = (dh % 100) * 10000000;
}
OpenPOWER on IntegriCloud