X-Spam-Check-By: sourceware.org Date: Mon, 26 Mar 2007 17:28:45 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Cc: bug-findutils AT gnu DOT org Subject: Re: Support for st_birthtime Message-ID: <20070326152845.GD6306@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com, bug-findutils AT gnu DOT org Mail-Followup-To: cygwin AT cygwin DOT com, bug-findutils AT gnu DOT org References: <4607BCA0 DOT 1060406 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 26 14:10, James Youngman wrote: > On 3/26/07, Eric Blake wrote: > >Corinna only replied to the cygwin list. It looks like Windows will > >populate st_birthtime with st_ctime when reading filesystems that don't > >support birthtime. Er, sorry, but I didn't say that. I said that all Windows functions returning filetimes will return a creation time. We can only work with the values given. I never found a situation in which the creation time is not set. And if it's set, we must trust the value. Native Windows file systems always maintain a real creation time and Samba fakes it. Samba sets the creation time to the minimum value of the stat members st_ctime, st_mtime and st_atime. The only timestamp I ever found to be 0 is the ChangeTime. This is the fourth timestamp maintained by the SMB protocol as well as by native NT functions and it's meaning is equivalent to st_ctime. This timestamp is not returned by Win32 funtions, but Cygwin uses the native NT functions so we get a valid st_ctime as long as the file system supports it. NTFS returns a valid ChangeTime. FAT returns 0, in which case Cygwin sets st_ctime = st_mtime. Unfortunately Samba sets the ChangeTime not to st_ctime, but to st_mtime, even if the underlying filesystem supports st_ctime. However, as I mentioned above, if the timestamp is valid, we have to trust it. We have no other way to evaluate a value. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/