From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 4EE033858D39; Tue, 9 Apr 2024 21:14:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EE033858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1712697296; bh=RLbSxO5/kPzShV5144BWu24puXNlH13SEmE+0rDEI8M=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=s8mLS2hOzpeQ2qrrzJxv0Cu2BGsjnqFKBOh4aumrXdhqizu9PJ52ToTBExUlQWcn9 8gvclRzu5ewAzzmjzAli9yqgj4ESSOjeXprl3reUv/OloJvbNR0yLWN1am7N4B4zz7 HLWuM6GmfqAemHIULlyeVEsVxMRQhGsj3uPZbDGo= Received: by calimero.vinschen.de (Postfix, from userid 500) id 96576A80DC7; Tue, 9 Apr 2024 23:14:54 +0200 (CEST) Date: Tue, 9 Apr 2024 23:14:54 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Win32 FILE_BASIC_INFORMATION.*Time.QuadPart - which value should be used if filesystem does not support it, so Cygwin /usr/bin/stat lists the value as '-'? Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: On Apr 5 04:26, Martin Wege via Cygwin wrote: > On Fri, Apr 5, 2024 at 2:05 AM Martin Wege wrote: > > > > Hello, > > > > I have problems with debugging, so a quick help would be appreciated, > > as I cannot figure this out after several hours of digging. > > > > Cygwin /usr/bin/stat returns "Birth: -" for some files. Which value > > must the CreationTime member of FILE_BASIC_INFORMATION have to cause > > /usr/bin/stat ti return "-"? 0, -1, or something else? > > In a related matter: > The Win32 FILE_BASIC_INFORMATION structure defines four time values: > > LARGE_INTEGER CreationTime; > LARGE_INTEGER LastAccessTime; > LARGE_INTEGER LastWriteTime; > LARGE_INTEGER ChangeTime; > > How can a filesystem indicate if it does not support a particular > timestamp, such as ChangeTime? Should ChangeTime.QuadPart then be -1, > -2 or 0, or another value? I'm not aware of a filesystem not supporting ChangeTime, that is, st_ctime. Usually only CreationTime (st_birthtime) is missing. I think setting the timestamp to 0 works for indicating that this kind of timestamp is not supported. Cygwin is handling Windows timestamps this way, but I can't find this in documentation ATM. But the FS driver can also just fill the CreationTime field with the same value as LastWriteTime or ChangeTime. MSFT NFS does that. Corinna