www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/03/19/13:22:20

Message-Id: <m0tz5y6-000GPWC@gwar.ardi.com>
Date: Tue, 19 Mar 96 11:17 MST
From: mat AT ardi DOT com (Mat Hostetter)
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp-workers AT delorie DOT com
Subject: Re: gdb info
In-Reply-To: <Pine.SUN.3.91.960319191311.21398C-100000@is>
References: <m0tz4KW-000GPWC AT gwar DOT ardi DOT com>
<Pine DOT SUN DOT 3 DOT 91 DOT 960319191311 DOT 21398C-100000 AT is>

>>>>> "Eli" == Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> writes:

    Eli> On Tue, 19 Mar 1996, Mat Hostetter wrote:

    >> This is for the nonexistent file `badfile', in C:/tmp (the
    >> working directory):
    >> 
    >> _truename returns nonzero.  canon_path is:
    >> 
    >> C:\tmp\BADFILE
    >> 
    >> drv_no is correctly derived from the "C:" prefix.
    >> 
    >> The __findfirst call on stat.c:522 returns nonzero.  The else
    >> clause on line 590 is successful:
    >> 
    >> else if (!_is_remote_drive(drv_no) && !__findfirst(path,
    >> &ff_blk, FA_LABEL))

    Eli> Of course, the FA_LABEL bug rears its ugly head again!  This
    Eli> clause was added when it was discovered that some network
    Eli> drives made trouble under Win95 when FA_LABEL bit was set in
    Eli> the `findfirst' call on line 522.  The solution was to check
    Eli> for labels separately, and then only for local drives.  Now
    Eli> it seems that at least for NT, local drives also have this
    Eli> problem.  Hmmm...  How about the ff_name (sp?) field of
    Eli> ff_blk--does it return something which ends with ``BADFILE''?
    Eli> If it returns garbage that can be reliably recognized as
    Eli> garbage, we could test for it.  A *real* volume label should
    Eli> return as "C:\\LABELNAME"; maybe anything else (like excess
    Eli> backslashes and such) can be taken as a sign of this problem
    Eli> and added to the above `else if' clause?  Comments, anyone?

C:, where the nonexistent file resides, used to be mounted as
"beaut_dos" under Linux, and perhaps Cliff gave the volume a similar
label long ago..  Here it shows the ff_name as "_BEAUT_DO.S"

Let me know what else you want me to try.

-Mat


487               drv_no = toupper(canon_path[0]) - 'A';
(gdb)
489         }
(gdb)
522       if (!__findfirst(path, &ff_blk, ALL_FILES))
(gdb)
590       else if (!_is_remote_drive(drv_no) && !__findfirst(path, &ff_blk, FA_L
ABEL))
(gdb) next
592           statbuf->st_mode = READ_ACCESS | S_IFLABEL;
(gdb) p ff_blk.ff_name
$1 = "BEAUT_DO.S\000\000\000\000\000MIDI=SYNTH:1 MAP:E\000OS=Windows_NT\000OS2LI
BPATH=E:\\WINNT35\\system32\\os2\\dll;\000PATH=E:\\WINNT35\\system32;E:\\WINNT35
;C:\\DJGPP;C:\\WINDOWS;C:\\BIN;C:\\DOS;C:\\DJGPP\\BIN;C:\\OEMA\000\002\000\000\0
00\000\000\000\b\000\000\000\0264\000\000\000\020\000\000\f\000"...
(gdb) p ff_blk
$2 = {lfn_magic = "\000\000\000\000\000", lfn_handle = 0, lfn_ctime = 29798,
  lfn_cdate = 19744, lfn_atime = 11603, lfn_adate = 20292,
  _ff_reserved = "S)\r\n", ff_attrib = 8 '\b', ff_ftime = 0, ff_fdate = 0,
  ff_fsize = 0,
  ff_name = "BEAUT_DO.S\000\000\000\000\000MIDI=SYNTH:1 MAP:E\000OS=Windows_NT\0
00OS2LIBPATH=E:\\WINNT35\\system32\\os2\\dll;\000PATH=E:\\WINNT35\\system32;E:\\
WINNT35;C:\\DJGPP;C:\\WINDOWS;C:\\BIN;C:\\DOS;C:\\DJGPP\\BIN;C:\\OEMA\000\002\00
0\000\000\000\000\000\b\000\000\000\0264\000\000\000\020\000\000\f\000"...}

- Raw text -


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