Date: Mon, 26 Feb 2001 21:43:51 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Martin Str|mberg Message-Id: <9003-Mon26Feb2001214351+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: <200102261835.TAA09061@mother.ludd.luth.se> (message from Martin Str|mberg on Mon, 26 Feb 2001 19:35:30 +0100 (MET)) Subject: Re: LFN and FreeDOS References: <200102261835 DOT TAA09061 AT mother DOT ludd DOT luth DOT se> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Martin Str|mberg > Date: Mon, 26 Feb 2001 19:35:30 +0100 (MET) > > if ((r.x.flags & 1) == 0 && r.x.ax != 0x7100) > { > ... > } > else > { > if (r.h.ah == 0x71) > { > errno = ENOSYS; > retval = 0; /* meaning none of the features supported */ > } > else > { > /* If the call failed, but not because the OS doesn't support > the function (e.g., invalid drive), don't disable LFN. */ > errno = __doserr_to_errno(r.x.ax); > retval = _FILESYS_UNKNOWN; > } > > Why are we accepting carry set and r.x.ax == 1 (1 is the error code > for "function number invalid")? Because RBIL says: INT 21 - Windows95 - LONG FILENAME - GET VOLUME INFORMATION AX = 71A0h DS:DX -> ASCIZ root name (e.g. "C:\") ES:DI -> buffer for file system name CX = size of ES:DI buffer Return: CF clear if successful AX destroyed (0000h and 0200h seen) BX = file system flags (see #01783) CX = maximum length of file name [usually 255] DX = maximum length of path [usually 260] ES:DI buffer filled (ASCIZ, e.g. "FAT","NTFS","CDFS") CF set on error AX = error code 7100h if function not supported So it looks like either FreeDOS does not comply to what it should be, or maybe RBIL is inaccurate. In general, unsupported functions should return something more prominent than just AX = 1, though.