Mail Archives: djgpp-workers/2001/02/26/14:46:10
> From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
> 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.
- Raw text -