Re: Debugging times

From: John Baldwin <jhb_at_freebsd.org>
Date: Mon, 16 Jul 2007 10:49:27 -0400
On Monday 16 July 2007 09:14:04 am Ivan Voras wrote:
> John Baldwin wrote:
> 
> > It's more that we use the filesystem's timestamp as a way to validate the 
> > timestamp from the RTC and to do a fixup if the RTC appears to be dead.
> 
> Why not use something that doesn't depend on external factors, like
> kernel build time (AFAIK it's embedded somewhere - at least it's written
> on boot)? This way people using non-UFS file systems wouldn't get bitten.

The kernel build time isn't updated if you leave a machine up for 2 years, but 
the filesystem mount time is.  Also, the kernel build time is not stored in a 
raw date format, but as part of a string, so you'd have to import strftime(3) 
into the kernel.  The kernel build time is also localized, so you'd have to 
import the timezone database into the kernel as well.  This Would Be Bad 
(tm).

-- 
John Baldwin
Received on Mon Jul 16 2007 - 12:58:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:14 UTC