Mail Archives: djgpp-workers/2001/02/26/13:35:50
I've been playing with FreeDOS lately. Now I have a question. Consider
this code from _use_lfn.c:
r.x.ax = 0x71a0; /* Get Volume Information function */
r.x.ds = tbuf_seg; /* DS:DX points to root directory name */
r.x.dx = 0;
r.x.es = tbuf_seg; /* ES:DI points to a buffer for filesys name */
r.x.di = (tbuf_la - __tb) & 0xffff;
r.x.cx = 32; /* max size of filesystem name (Interrupt List) */
__dpmi_int(0x21, &r);
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")? FreeDOS is reporting this (correctly,
IMO) as it doesn't support any LFNs.
Right,
MartinS
- Raw text -