diff options
-rw-r--r-- | sys/msdosfs/msdosfs_conv.c | 8 | ||||
-rw-r--r-- | usr.sbin/makefs/msdos/msdosfs_vfsops.c | 11 |
2 files changed, 5 insertions, 14 deletions
diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c index 80eec767891..11f263ee326 100644 --- a/sys/msdosfs/msdosfs_conv.c +++ b/sys/msdosfs/msdosfs_conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_conv.c,v 1.19 2015/10/23 10:45:31 krw Exp $ */ +/* $OpenBSD: msdosfs_conv.c,v 1.20 2019/09/04 14:40:22 cheloha Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.24 1997/10/17 11:23:54 ws Exp $ */ /*- @@ -108,8 +108,7 @@ unix2dostime(struct timespec *tsp, u_int16_t *ddp, u_int16_t *dtp, u_int8_t *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 - (tz.tz_minuteswest * 60) - /* +- daylight saving time correction */ ; + t = tsp->tv_sec; t &= ~1; /* * Before 1/1/1980 there is only a timeless void. After 12/31/2107 @@ -228,8 +227,7 @@ dos2unixtime(u_int dd, u_int dt, u_int dh, struct timespec *tsp) days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1; lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980; } - tsp->tv_sec = seconds + lastseconds + (tz.tz_minuteswest * 60) - /* -+ daylight saving time correction */ ; + tsp->tv_sec = seconds + lastseconds; tsp->tv_nsec = (dh % 100) * 10000000; } diff --git a/usr.sbin/makefs/msdos/msdosfs_vfsops.c b/usr.sbin/makefs/msdos/msdosfs_vfsops.c index 4af65f5fe63..91032db91ab 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vfsops.c,v 1.11 2016/12/17 16:43:30 krw Exp $ */ +/* $OpenBSD: msdosfs_vfsops.c,v 1.12 2019/09/04 14:40:22 cheloha Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -48,7 +48,6 @@ */ #include <sys/param.h> -#include <sys/time.h> #include "ffs/buf.h" @@ -87,7 +86,6 @@ msdosfs_mount(struct mkfsvnode *devvp, int flags) uint8_t SecPerClust; int ronly = 0, error; int bsize; - struct timezone tz; unsigned secsize = 512; DPRINTF(("%s(bread 0)\n", __func__)); @@ -125,12 +123,7 @@ msdosfs_mount(struct mkfsvnode *devvp, int flags) pmp->pm_SecPerTrack = getushort(b50->bpbSecPerTrack); pmp->pm_Heads = getushort(b50->bpbHeads); pmp->pm_Media = b50->bpbMedia; - - if (gettimeofday(NULL, &tz) == -1) { - error = errno; - goto error_exit; - } - pmp->pm_minuteswest = tz.tz_minuteswest; + pmp->pm_minuteswest = 0; DPRINTF(("%s(BytesPerSec=%u, ResSectors=%u, FATs=%d, RootDirEnts=%u, " "Sectors=%u, FATsecs=%lu, SecPerTrack=%u, Heads=%u, Media=%u)\n", |