diff options
Diffstat (limited to 'usr.sbin/makefs/msdos/msdosfs_vnops.c')
-rw-r--r-- | usr.sbin/makefs/msdos/msdosfs_vnops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index ae1fa3f7bf75..b104f419a86a 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -94,10 +94,8 @@ static void unix2fattime(const struct timespec *tsp, uint16_t *ddp, static void msdosfs_times(struct denode *dep, const struct stat *st) { - if (stampst.st_ino) - st = &stampst; -#ifdef HAVE_STRUCT_STAT_BIRTHTIME +#if HAVE_STRUCT_STAT_BIRTHTIME unix2fattime(&st->st_birthtim, &dep->de_CDate, &dep->de_CTime); #else unix2fattime(&st->st_ctim, &dep->de_CDate, &dep->de_CTime); @@ -113,7 +111,7 @@ unix2fattime(const struct timespec *tsp, uint16_t *ddp, uint16_t *dtp) struct tm lt = {0}; t1 = tsp->tv_sec; - localtime_r(&t1, <); + gmtime_r(&t1, <); unsigned long fat_time = ((lt.tm_year - 80) << 25) | ((lt.tm_mon + 1) << 21) | |