From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 19 20:20:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AA24106564A for ; Thu, 19 Mar 2009 20:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 888308FC1D for ; Thu, 19 Mar 2009 20:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2JKK3u8082587 for ; Thu, 19 Mar 2009 20:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2JKK3Us082586; Thu, 19 Mar 2009 20:20:03 GMT (envelope-from gnats) Date: Thu, 19 Mar 2009 20:20:03 GMT Message-Id: <200903192020.n2JKK3Us082586@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Christopher Key Cc: Subject: Re: kern/97786: [udf] [patch] fs/udf: incorrect timestamps X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christopher Key List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2009 20:20:04 -0000 The following reply was made to PR kern/97786; it has been noted by GNATS. From: Christopher Key To: bug-followup@FreeBSD.org, avg@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--