X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D51BF3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1712697344; bh=9JJOlW394ingWnWqpL0UP/ltMsl5fen+iM3bDUHZk/Y=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xHx3Q8sIBQ8vzbx/+VDk0QJmWUPvT1f9weBQ98TvNMZ1tS9H3T89RD8g8Rz2ra/Jo tOQzbaEXY0FaqDGhzUGBvf8Msbn/10vvISTf0tfj8Y+x6aqArxV6XKgwUQC2zjVsAf HgZe87r2ZZo7x086guusHUcSVanwlqAYaMadQjP4= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EE033858D39 Date: Tue, 9 Apr 2024 23:14:54 +0200 To: cygwin AT cygwin DOT 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: Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 439LFjm7633981 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple