kern/97786: [udf] [patch] fs/udf: incorrect timestamps
Christopher Key
cjk32 at cam.ac.uk
Thu Mar 19 13:20:04 PDT 2009
The following reply was made to PR kern/97786; it has been noted by GNATS.
From: Christopher Key <cjk32 at cam.ac.uk>
To: bug-followup at FreeBSD.org, avg at topspin.kiev.ua
Cc:
Subject: Re: kern/97786: [udf] [patch] fs/udf: incorrect timestamps
Date: Thu, 19 Mar 2009 20:12:39 +0000
This is a multi-part message in MIME format.
--------------030203030007060208040602
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
The applied patch is calculating microseconds instead of nanoseconds,
new patch attached.
Also, is there any chance of getting this MFCed?
--------------030203030007060208040602
Content-Type: text/plain;
name="udf-nsec.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="udf-nsec.patch"
Index: sys/fs/udf/udf_vnops.c
===================================================================
--- sys/fs/udf/udf_vnops.c (revision 190096)
+++ sys/fs/udf/udf_vnops.c (working copy)
@@ -260,9 +260,10 @@
daysinyear += udf_isaleapyear(i);
t->tv_sec += daysinyear * 3600 * 24;
- /* Calculate microseconds */
- t->tv_nsec = time->centisec * 10000 + time->hund_usec * 100 +
- time->usec;
+ /* Calculate nanoseconds */
+ t->tv_nsec = time->centisec * 100 * 100 * 1000 +
+ time->hund_usec * 100 * 1000 +
+ time->usec * 1000;
/*
* Calculate the time zone. The timezone is 12 bit signed 2's
--------------030203030007060208040602--
More information about the freebsd-bugs
mailing list