Japheth

Germany (South), 03.09.2011, 08:18 |
Patch for DOSLFN 0.40e (Users) |
Hello,
as some of you are probably aware of, DOSLFN 0.40e from Jason Hood has (a) serious bug(s) that may cause corruption of directory entries.
I was able to track (one of) the bug(s) down. After the bug was fixed, I didn't experience corruptions anymore as of yet, but there is no guarantee. That's why I post the fix here: you should try it and report your experiences.
Also, the fix is for the source code only, because DOSLFN is copyrighted software - you will have to assemble and link the source.
1. change DOSLFN.ASM
@@pop_open_only:
pop ax
if 1
;--- japheth: BX is not set to a DIRENT here!
;--- so we cant copy anything to/from [bx] as it's done below.
call Copy_FCB_8P3_from_FCB_to_DI
jmp SFN_6C_CallOld ;just call old int 21h, ax=6c00h
endif
@@open_only:
2. assemble and link DOSLFN.ASM to DOSLFN.COM:
tasm -m5 -la doslfn.asm
tlink -3 -t -s doslfn.obj
--- MS-DOS forever! |
ecm

Düsseldorf, Germany, 03.09.2011, 15:24
@ Japheth
|
Patch for DOSLFN 0.40e |
> Also, the fix is for the source code only, because DOSLFN is copyrighted
> software - you will have to assemble and link the source.
Isn't there something about that in the documentation or source? In any case, when I asked Henrik some time ago about some other source code he provided on his website, he told me that he basically doesn't care what people do with it, he only asks for attribution. --- l |
Rugxulo

Usono, 03.09.2011, 21:53
@ Japheth
|
Patch for DOSLFN 0.40e |
> as some of you are probably aware of, DOSLFN 0.40e from Jason Hood has (a)
> serious bug(s) that may cause corruption of directory entries.
>
> I was able to track (one of) the bug(s) down. After the bug was fixed, I
> didn't experience corruptions anymore as of yet, but there is no guarantee.
> That's why I post the fix here: you should try it and report your
> experiences.
Have you reported this to Jason directly? Would be better for him to fix his version.
> Also, the fix is for the source code only, because DOSLFN is copyrighted
> software - you will have to assemble and link the source.
A context diff would've been nicer here (and I'm pretty sure copyright law allows that).
But yeah, anyways, thanks, I'll try to try it out.  |
Rugxulo

Usono, 03.09.2011, 23:31
@ Rugxulo
|
Patch for DOSLFN 0.40e |
> > I was able to track (one of) the bug(s) down.
Apparently there's another bug (regression) discovered by Juan on comp.os.msdos.djgpp (re: DJGPP 2.04 w/ MS-DOS 6.22 + DOSLFN 0.40e):
> I have found my old FreeDOS CD and installed DOSLFN 0.40c.
> With this driver everthing works on MSDOS. Stepping into
> the filelength() code shows that the 0.40e version does
> not set the CF when it returns from 0x71A6 call while 0.40c
> does so that it jumps directly into the 0x4201 code instead
> of returning an EOVERFLOW. |
Japheth

Germany (South), 04.09.2011, 03:14
@ Rugxulo
|
Patch for DOSLFN 0.40e |
> Apparently there's another bug (regression) discovered by Juan on
> comp.os.msdos.djgpp
> (re: DJGPP 2.04 w/ MS-DOS 6.22 + DOSLFN 0.40e):
>
> > I have found my old FreeDOS CD and installed DOSLFN 0.40c.
> > With this driver everthing works on MSDOS. Stepping into
> > the filelength() code shows that the 0.40e version does
> > not set the CF when it returns from 0x71A6 call while 0.40c
> > does so that it jumps directly into the 0x4201 code instead
> > of returning an EOVERFLOW.
I don't think this is a bug in DOSLFN, it is almost certainly a bug in DPGJJ - as usual.
Why? Because it's known and old hat that DOSLFN does NOT support function 71A6h:
DOSLFN.ASM itself:
verteiler: DVT 39h,lfn_mkdir ;w DS:DX
DVT 3Ah,lfn_rmdir ;w DS:DX
DVT 3Bh,lfn_chdir ;r DS:DX
DVT 41h,lfn_unlink ;w DS:DX CX SI
DVT 43h,lfn_attr ;? DS:DX BL CX SI DI
DVT 47h,lfn_pwd ;r DS:SI DL
DVT 4Eh,lfn_ffirst ;r DS:DX ES:DI CX SI
DVT 4Fh,lfn_fnext ;r BX ES:DI SI
DVT 56h,lfn_move ;w DS:DX ES:DI
DVT 60h,lfn_name ;r DS:SI ES:DI CX
DVT 6Ch,lfn_creat ;? DS:SI BX CX DX DI
DVT 0A0h,lfn_volinfo ;- DS:DX ES:DI BX CX DX
DVT 0A1h,lfn_fclose ;r BX
;--- entry 0A6h ( get file info by handle ) is missing
DVT 0A7h,lfn_timeconv;- DS:SI BX CX DX
DVT 0A8h,lfn_genshort;- DS:SI ES:DI DX
DVT 0AAh,lfn_subst ;- DS:DX BH(=0,1,2) BL(=LW)
db 0
or DOSLFN.TXT
THAT WILL PROBABLY NEVER WORK:
* functions around SUBST, AL=AAh ("query subst" is available)
* file creation from server, AL=A9h
* retrieve handle information, AL=A6h
* reset drive, AL=0Dh
That's why calling this function must be done very carefully. See HX, DKRNL32, file GETFINFO.ASM:
mov ebx, handle
mov edx, pFileInfo
mov ax,71A6h ;this is NOT implemented in DOSLFN!!!
stc
int 21h
jnc exit
cmp ax,7100h
jnz error
And my suspicion is that DGVJJ does NOT call this function "very carefully". --- MS-DOS forever! |
DOS386
04.09.2011, 12:52
@ Japheth
|
Patch for DOSLFN 0.40e | INT $21 / AX=$71A6 (GFIBH) |
> Why? Because it's known and old hat that DOSLFN does NOT support function 71A6
King Udo supports it ... but it's buggy  --- This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft *** |
DOS386
06.09.2011, 06:23
@ Japheth
|
Patch for DGJPP 2.04 |
> And my suspicion is that DGVJJ does NOT call this function "very carefully".
They just brewed a path for over 10 years old code:
--- djgpp.orig/src/libc/posix/sys/stat/lfilelen.c 2001-02-04 19:13:00 +0000
+++ djgpp/src/libc/posix/sys/stat/lfilelen.c 2011-09-04 12:25:38 +0000
(link above) --- This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft *** |
Laaca

Czech republic, 11.09.2011, 22:19
@ DOS386
|
Patch for DOSLFN 0.40e | INT $21 / AX=$71A6 (GFIBH) |
Today I compiled your patch with TASM 4.1 and it worked without any problems. Thanks Japheth!
I think it is very important patch which could be applied in FreeDOS 1.1. --- DOS-u-akbar! |
RayeR

CZ, 12.09.2011, 13:51
@ Laaca
|
Patch for DOSLFN 0.40e | INT $21 / AX=$71A6 (GFIBH) |
> Today I compiled your patch with TASM 4.1 and it worked without any
> problems. Thanks Japheth!
Please could you upload your binaries somewhere (or send me via mail)? Thx --- DOS gives me freedom to unlimited HW access. |
Rugxulo

Usono, 17.09.2011, 20:02
@ RayeR
|
Patch for DOSLFN 0.40e (Japheth) |
> > Today I compiled your patch with TASM 4.1 and it worked without any
> > problems. Thanks Japheth!
>
> Please could you upload your binaries somewhere (or send me via mail)? Thx
doslf40f.zip |
RayeR

CZ, 19.09.2011, 15:18
@ Rugxulo
|
Patch for DOSLFN 0.40e (Japheth) |
> doslf40f.zip
Thx, I already got fixed ver from Laaca... --- DOS gives me freedom to unlimited HW access. |
tikbalang
19.09.2011, 16:08
@ RayeR
|
Patch for DOSLFN 0.40e (Japheth) |
> >
> doslf40f.zip
>
> Thx, I already got fixed ver from Laaca...
i have here a doslfn which seems to be a continuation of version 0.40E
Version 0.40F
+ Better support for DBCS code pages and more
http://www.multiupload com/7OTZTRTHFD |
tikbalang
19.09.2011, 16:26
@ tikbalang
|
Patch for DOSLFN 0.40e (Japheth) |
>
> Version 0.40F
> + Better support for DBCS code pages and more
>
> http://www.multiupload com/7OTZTRTHFD
another doslfn "F"
multiupload.com/YTZ1JV7CAF |
Rugxulo

Usono, 19.09.2011, 23:22
@ tikbalang
|
Patch for DOSLFN 0.40e (Japheth) |
> >
> > Version 0.40F
> > + Better support for DBCS code pages and more
> >
> > http://www.multiupload com/7OTZTRTHFD
>
>
> another doslfn "F"
>
> multiupload.com/YTZ1JV7CAF
Two different files, hmmmm, weird. But yeah, I remember at least one of these. IIRC, the only problem (confirmed as still) is that both are closed source! Argh. So that's fairly useless.  |