delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2016/05/12/18:45:11

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Wiktor S. (wswiktorSP AT Mpoczta DOT fm) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Fwd: A few DJGPP libc.a bugs
Date: Fri, 13 May 2016 00:31:27 +0200
Organization: INTERIA.PL S.A.
Lines: 41
Message-ID: <nh3084$ebk$1@usenet.news.interia.pl>
References: <56F8295E DOT 2090401 AT posteo DOT de> <571E403D DOT 8080709 AT iki DOT fi> <571E4A50 DOT 3010806 AT iki DOT fi> <571E8166 DOT 1000103 AT gmx DOT de> <571EE412 DOT 6000005 AT iki DOT fi> <CAA-ihx914xS1qBNrR0Uii-jEm_-Q99LtbWHGmbjRj=azqidnaA AT mail DOT gmail DOT com> <152f7110-7932-a6db-30fd-afccd63822d4 AT iki DOT fi> <ngtd8c$vli$1 AT usenet DOT news DOT interia DOT pl> <83shxpavlp DOT fsf AT gnu DOT org> <nh09kj$s6h$1 AT usenet DOT news DOT interia DOT pl> <83zirvajs4 DOT fsf AT gnu DOT org>
NNTP-Posting-Host: user-109-243-236-184.play-internet.pl
Mime-Version: 1.0
X-Trace: usenet.news.interia.pl 1463092292 14708 109.243.236.184 (12 May 2016 22:31:32 GMT)
X-Complaints-To: usenet AT firma DOT interia DOT pl
NNTP-Posting-Date: Thu, 12 May 2016 22:31:32 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Bytes: 2874
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> That logic is as follows:

>  . If we are on NT family of Windows (which is your case), then:
>    . Produce the short 8+3 alias (SFN) of the long file name (LFN)
>    . If producing SFN succeeded, then:
>      . Open the file by its SFN
>    . Otherwise get file's attributes by its LFN
>    . If getting file's attributes succeeds, try opening by LFN, but
>      using the SFN variant of DOS OPEN function
>    . Otherwise, fail

> So I think some of this logic doesn't work with exFat volumes, the
> question is which one?

> E.g., I'm not sure exFAT support SFN as we expect.

exFAT does not keep 8.3 names on-disk at all.
I knew this, but I always assumed that the OS would simply generate short 
file names on the fly. I just checked that and it appears that this is not 
the case.

Non-LFN-aware programs cannot access long file names on exFAT partitions *at 
all*.

The files are not listed. Only files that fit in 8.3 scheme are accessible 
by SFN API.

I don't yet know at which step the algorithm fails, but it is clear that 
"Open the file by its SFN" or "try opening by LFN, but using the SFN variant 
of DOS OPEN function" (whatever that last thing means) is not the way to go 
on exFAT.

On exFAT (and possibly in Windows 10 on NTFS too) the logic should be 
something like "if the file has long name, use solely LFN calls".

I will investigate it further tomorrow.

-- 
Wiktor S.


- Raw text -


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