delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2018/05/10/17:03:09

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <5AF4B346.5030103@gmx.de>
Date: Thu, 10 May 2018 23:01:58 +0200
From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp-workers AT delorie DOT com]" <djgpp-workers AT delorie DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: DJGPP on NTF with SFN creating disabled [was : gcc-8.1.0 packages
for testing]
References: <0244cff9-6176-8aec-bbc2-6fc49602c295 AT iki DOT fi> <558b5ff2-71df-e556-a874-7acbb264c84a AT iki DOT fi> <5AED9B44 DOT 90000 AT gmx DOT de> <df616b96-646c-788b-3177-87de740f03ae AT iki DOT fi> <5AEF5D3A DOT 2030409 AT gmx DOT de> <3569b441-e678-7252-ffdd-7c45f72a5c56 AT iki DOT fi> <831senqoja DOT fsf AT gnu DOT org>
In-Reply-To: <831senqoja.fsf@gnu.org>
X-Provags-ID: V03:K1:Xa6vY7vS4a68REKkTLV7HpuSkuS/I3tpNIZ2Dbif4cfCl2K2mfx
O2EG2CUTvWpuBuKCI1A1sVnvds3woNlW007aEblvNAD04AMI6EOMZh1fbFtDpF+6MHVt3H/
oPygCzYa2wgRYAKs4PvySZxrwtAvJ5PYUSvsG9OaQfmhCpY4xrP5n3O1m2KYdDD3z6CR926
+USHPY+7UUfMAqSF33xpA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:9X5Tupfbu1g=:wnVEOfTEbxh+YbGnpwHDOb
bk+Euo2W4HmR9Kh1NZE9jjZNxb80m1/foTFx5LTf6B3tv/eol1+nzyQYqiUm3gMnb8a7R3yhx
lcB8XuJdUdn8731uB7+KEMn0+tOtQd0aWzDb1uZloqe8AMKI67xoSB8TpdPZhlCCcm+D0MOYk
A2XKVSLfsSMF45OW0Q7BD6sCqFQ1VmyVyjNoyAXrAC85N75SlE1VHOBClnOt/8vajfIufjutd
nNBkLrFS/uoeExGiSeNQwiz0h+DfDCfDgzcK49o5LLU6Ddt/wZwqrE/0IFhLt83LqRM0BtP/t
xt1FI9v6rhP5/yU5+HEeCv+wtmv1IOQocDaoayfs9YFKsld1hefhKqbgkNovKkX2A69mGVoLQ
RPIK2/95ZAddUbGcOmWBB5EqaG3BYoPE/zUC2MDAwWvECknei8bGagn1KjAao4maRueTdYgXH
k6oJL0G/zG8SK6kD1bDygCqrpK4PUjkqNuDIp98EpMINAAk9eEXmtbQNxm8TBHXetskt02wLt
CaFsM/PclvIaftaK9SnEA6ZJBRr2C/MsX8+Ugb+jBTwvWLvXHUsnVAqXYvfY3N5DtiqWt45XO
prFQdVZvDphXoSVAOUwwa0XoYd1Ro2wZ3QIx66nH0L9tzFp+15zuik640T7XR106J3ELbfso1
jhxZozG8LyfHbr7zOIKv541TWXv4tVF2gDcoNzK77S2hSCQ7rFM+w7fQ08Kr7dQqR59vfHjEx
WL6mcwWZKL1XA9eA7n+VEVUFXHmseK6i1H9YRK03GQkMuKGGn+S97WVkqhxDjOSopyaROr0MQ
QAMK4PR
Reply-To: djgpp-workers AT delorie DOT com

Am 07.05.2018 21:00, schrieb Eli Zaretskii (eliz AT gnu DOT org) [via djgpp-workers AT delorie DOT com]:
>> From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp-workers AT delorie DOT com]"<djgpp-workers AT delorie DOT com>
>> Date: Mon, 7 May 2018 18:48:52 +0300
>>
>> It seems that DJGPP mailing list has at least partial fix:
>>
>> http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp/2016/05/14/13:45:09
>>
>> Patch was intended for exFAT which seems to not have SFN either. It works also for NTFS.
>
> So the problem is that getShoirtFileName succeeds (although there's no
> SFN), but then OpenFile using that "short name" fails, is that it?
>
> If I understood correctly, then what kind of "SFN" do we get in those
> cases?
>
> (Also please note that old message said the patch didn't resolve all
> the problems on exFAT, so presumably the same holds when SFNs are
> disabled on NTFS.
>
> Thanks.

In _open, the function 0x7160 is used to get the SFN if _os_trueversion == 0x532.
The function does not fail if no SFN are availabe; it simply returns the LFN.
This is true for WinXP and Win2K.  I have no chance to check any other OS that
uses NTFS.  Because the function does not fail, our implementation assumes that
a valid SFN is stored in ES:DI and assign it to DS:SI.  Now the SFN function 0x6C00
will be used to open the file. This fails with AX = 2.  In the best case, this
still may work if the path and file name fits the short file name requirements
but it will fail in general.

My fix for this issue is identical to what has been propoced by the other guy,
thus I will not show it.  It shall be noted that this patch does certainly not
fix all issues.  With this patch the read and thus file opening is fixed but it
misserabily fails when I try to write and thus create a file.  Here certainly
a lot of more work is required.  Probaly all LFN operations like unlink and so
on are affected on NTFS.  I will send patches as soon as I have fixed the isues
I will find.
Again, the SFN is the LFN and this may work or not for SFN functions.

Regards,
Juan M. Guerrero

- Raw text -


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