Hi Jeremy, that was quick...

> > quite straightforward: 1. . .. \ are all no device names and
> > 2. dhp->dh_attr should be tested for ATTR_CHAR before comparing
> > the IsDevice input to dhp->dh_name.

> Eric, I have uploaded a test kernel [stable branch] for you to try.
> http://www.fdos.org/kernel/test/kernel.eric.sys

Unfortunately this only fixes HALF of the problem: Actual / diskimage
drives now allow CD .. again even if a block device driver which has
the whole dh_name field filled with 00s (including the number-of-units
value in the first byte, which ONLY happens for the deskwork.de dwdos
RAMDISK and the OLD 3.13 DEVLOAD - both the new DEVLOAD and the DOS
kernel (if you use DEVICE= instead of DEVLOAD) fill in number-of-units
from the driver init call response).

HOWEVER, if you DEVLOAD-old load the Deskwork ramdisk (so you have a
block device with all-zero dh_name in the device chain), DOSEmu
lredir drives (in my case: C: drive) appear completely empty. I can
flip that problem by manually changing dh_name[0] of the Deskwork
ramdisk between 00 (caused by devload problem) and 01 (correct).

So your kernel is still not immune to the problem entirely - it still
somehow uses "names" of block device drivers even though those names
are optional and not even related to file name processing at all.

> Unfortunately I don't get the error you are experiencing with devload 
> and xmsdisk, it works fine for me without the fix...

XMSDSK has some name in dh_name[1..7] and also fills in dh_name[0]
even if the "kernel" (here: old devload version) fails to do that for it.

> I also fixed a bug in that function 
> where device names shorter than 8 characters could return as not a 
> device (on these i==FNAME_SIZE+1 due to inner for loop).

Are you sure that there was a bug? Maybe you even introduced one ;-).

The comparison is meant to check if all chars beyond the end of the
checked name are either 00 or space in the device header. If so, the
device name is matching the checked name. So all 8 bytes of dh_name
are checked before you know that it is a match.

I think you got the "bypass search if name is empty (. .. or root)"
right but have an error in "skip name check if block device" - you
can check that by using old devload and deskwork ramdisk. Or just
use DEBUG to zero out the dh_name bytes (including the [0] one)
in the device header of your loaded XMSDSK.

If you have no DOSEmu, you should disable the "skip if .." part
of your patch to make problems with "skip if block device" visible
even on real / local drives.

Eric



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to