Module Name:    src
Committed By:   perseant
Date:           Wed Aug 14 15:30:00 UTC 2024

Modified Files:
        src/sys/fs/exfatfs [perseant-exfatfs]: exfatfs_conv.c

Log Message:
Add seconds back into the userland version of dos2unixtime.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/fs/exfatfs/exfatfs_conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/exfatfs/exfatfs_conv.c
diff -u src/sys/fs/exfatfs/exfatfs_conv.c:1.1.2.3 src/sys/fs/exfatfs/exfatfs_conv.c:1.1.2.4
--- src/sys/fs/exfatfs/exfatfs_conv.c:1.1.2.3	Wed Jul 31 03:43:16 2024
+++ src/sys/fs/exfatfs/exfatfs_conv.c	Wed Aug 14 15:29:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: exfatfs_conv.c,v 1.1.2.3 2024/07/31 03:43:16 perseant Exp $	*/
+/*	$NetBSD: exfatfs_conv.c,v 1.1.2.4 2024/08/14 15:29:59 perseant Exp $	*/
 
 /*-
  * Copyright (c) 2022, 2024 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exfatfs_conv.c,v 1.1.2.3 2024/07/31 03:43:16 perseant Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exfatfs_conv.c,v 1.1.2.4 2024/08/14 15:29:59 perseant Exp $");
 
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
@@ -282,7 +282,7 @@ exfatfs_unix2dostime(const struct timesp
 	if (dhp)
 		*dhp = (tsp->tv_sec & 1) * 100 + tsp->tv_nsec / 10000000;
 	if (dtp)
-	return;
+		return;
 
 invalid_dos_date:
 	*dtp = 0;
@@ -308,7 +308,7 @@ exfatfs_dos2unixtime(uint32_t dt, uint8_
 	tm.tm_gmtoff = 0;
 
 	seconds = mktime_z(NULL, &tm);
-	tsp->tv_sec = seconds;
+	tsp->tv_sec = seconds + (dh / 100);
 	tsp->tv_sec -= gmtoff;	/* time zone correction */
 	tsp->tv_nsec = (dh % 100) * 10000000;
 

Reply via email to