www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/02/03/00:15:52

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 6135FpBQ3642985
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 6135FpBQ3642985
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=g3SkUCNM
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 928324BC7EC1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1770095750;
bh=hUkO0C2Du2cuWt9MZxGjELGZKnet5N1yBj/1uQXERkM=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=g3SkUCNM4Zyy0suM6/xsdxXgyhrOJKpJ8reGXQAbHPhh0W04gW0i85xrRGJPDhMsZ
TYR4Y9FiODXNSh5lldPvAFWGedlCQJwrkf+gw6ynAY1B7aHZYVgej4Kou+lBugvlpH
uZrZwAqqVI9bCuxL7VXXb2XIKl55txpfofecs2Oo=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98F7A4BB58EE
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 98F7A4BB58EE
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770095702; cv=none;
b=R4N6asXux2lUUUdFAR7yyXkNX2bVZAPpnIfLE/x7bGpTw34ESYSMD6NuMA7ivN8Ak678/6L/42cwrqynDIvaX6X6ZcbRQ1Imp8DZqWFHtRzYpqQNhm2dfCqRoejBwxs1+NHkL4RU1kuPApaKmz/395nE5kypKqruvldVqiNgQ6w=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1770095702; c=relaxed/simple;
bh=B7QKQ3fuJD5HiPLK+HUWchkz4Y1sbmaJBzoNc82sS5U=;
h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
b=YfLf1+NmuY1fhy3myPkRrhrSKqDbrixE9YM5PSDM+Tv9OxrfQb/ouJIAv7qDVuAZ/paT+JPAxoQviMpuKJxX8dSeIM96zFPiDzI5CT4TRTlERbOA4eVMt+WE4DxLvEqzXEfSUyHCrG2k7FPWK6H5+DE7c1wMehQrFEUa2KKLZsM=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98F7A4BB58EE
Message-ID: <824acc55-777e-4003-8414-8cde113de5fe@systematicsw.ab.ca>
Date: Mon, 2 Feb 2026 22:14:59 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: git fsck complains about error:
refs/tags/.cyg000000000559e25517156b51cf219f51/libgcj-2.95.0: badRefName:
invalid refname format?!
To: cygwin AT cygwin DOT com
References: <CAAvCNcDzoq3skCwRuYa2LLTTA3xsnK+eDLB8_SegJZinatMUSg AT mail DOT gmail DOT com>
<fc1bdd5b-7732-4430-a130-70ef662acd36 AT dronecode DOT org DOT uk>
<CAAvCNcAAoJeX470QBp9x+A=zSupb_5TpVDeqnbsJS9dtd-oXQg AT mail DOT gmail DOT com>
<aYCpYYE1scT7bdaA AT calimero DOT vinschen DOT de>
<a316e348-e77a-809e-ea77-aeb527d7cdd2 AT wisemo DOT com>
Organization: Systematic Software
In-Reply-To: <a316e348-e77a-809e-ea77-aeb527d7cdd2@wisemo.com>
X-Stat-Signature: 1epmk3iswyiqsccgmjno9dkhqj8ar8mr
X-Rspamd-Server: rspamout03
X-Rspamd-Queue-Id: B76FE2002D
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX1/OvL9g2ZuMJN/Yz1lqbHdBud3Dm6eXLpM=
X-HE-Tag: 1770095700-549136
X-HE-Meta: U2FsdGVkX19nd1zHIYUQlTuXmIoTJq4Pfwbi1L0q/5TBGdllhFGSVrKVIWHOjdWso0zQzg1vwVbATxxGF3C9W6TN6+GVZjLbWtK4SwT11B0GQnjBgFxkLfPGFXsy62oFFPUEZiGi5sLnyr/ziMWLdAvNOpqg0ybiVfqyjrqdWOmJWqPslBVzYYZZu9SZ/74wmzp8+C9uD16qBg548iFk1n10zAmYsnQtWQPBhAYCsvsyLPhXsM/pE4WQus9ZOc2wHyc3xtICfuyWhNuf7uhUd8qMerpgvznqnq+A7XgZRSul6j6Y4neVCjXqGW9CylJH9BD2/IMHc4ZVQ3zYc6/V2MhL4UfAJpG1
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: brian DOT inglis AT systematicsw DOT ab DOT ca
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 6135FpBQ3642985

On 2026-02-02 08:48, Jakob Bohm via Cygwin wrote:
> On 02/02/2026 14:40, Corinna Vinschen via Cygwin wrote:
>> On Feb  2 13:24, Dan Shelton via Cygwin wrote:
>>> I'm not sure whether the Cygwin code is correct. I did a peek with a
>>> kernel debugger, and I see that FILE_RENAME_INFORMATION.RootDirectory
>>> is always NULL if a file gets renamed to .cyg000000000xxxx. But if I
>>> try that with NTFS or SMB, the NtSetInformationFile() to set
>>> FileRenameInformation always fails.
>> Your testcase is incorrect, unfortunately.
>>
>>>      fri->FileNameLength = (wcslen(dstfile)+1)*sizeof(wchar_t);
>> For NT file paths, never count the trailing \0 to the length:
>>
>>        fri->FileNameLength = wcslen(dstfile) * sizeof (WCHAR);
>>
>> With that, your testcase works fine for me.

> I am not sure what data structure this supposed "Friday" variable points to,

Ikke fredag: Windows abbrev; see Dan's post earlier in thread with inline STC:

     size_t fri_len = sizeof(FILE_RENAME_INFORMATION) +
(wcslen(dstfile)+1)*sizeof(wchar_t);

     fri = calloc(1, fri_len);

> but in NT low level APIs, such as the NTXxxx syscalls exported by ntdll.dll,
> a common structure is the UNICODE_STRING, which has 3 fields:
>     Pointer to string buffer,
>     Size of string buffer in bytes (often (length+1) * sizeof(WCHAR)) and
>     Size of actual string in bytes (not counting the optional term 0 or other 
> unused buffer space)
> Both byte counts are 16 bits, so structure can only hold strings up to 32767 
> WCHARs.
 >
> There are very similar structures using plain char and these structures can also 
> be marshalled into byte streams by replacing the pointer with a 32 bit byte offset.
Cygwin usually uses the user NT service routines <null>/Ex/W/A functions taking 
WCHAR or char pointers or buffers and lengths.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019