delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/26/13:35:50

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200102261835.TAA09061@mother.ludd.luth.se>
Subject: LFN and FreeDOS
To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
Date: Mon, 26 Feb 2001 19:35:30 +0100 (MET)
X-Mailer: ELM [version 2.5 PL2]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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 -


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