Message-Id: Date: Tue, 19 Mar 96 11:17 MST From: mat AT ardi DOT com (Mat Hostetter) To: Eli Zaretskii Cc: djgpp-workers AT delorie DOT com Subject: Re: gdb info In-Reply-To: References: >>>>> "Eli" == Eli Zaretskii 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"...}