Eric Auer wrote:
...
struct dhdr FAR *IsDevice(const char FAR * fname)
has a problem here. But why does that only happen with DEVLOAD?
...
I hope there are still some readers on the kernel list and we
can move the further discussion to that list. A fix should be
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.
struct dhdr { struct dhdr FAR *dh_next; UWORD dh_attr;
VOID(*dh_strategy) (void); VOID(*dh_interrupt) (void); UBYTE dh_name[8]; };
Eric, I have uploaded a test kernel [stable branch] for you to try.
http://www.fdos.org/kernel/test/kernel.eric.sys
It implements the two items you suggest, a check check for \,., and ..
before checking all device headers, and the device header is checked to
make sure it is a character device before testing its name.
Unfortunately I don't get the error you are experiencing with devload
and xmsdisk, it works fine for me without the fix so I can't verify it
will fix your problem (my guess is my computer's memory has 0s or values
that don't trigger the problem). 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).
As soon as you test and get back to me, I will either change or commit.
By the way, init_device drops devices which either take no memory
(endaddr same as device header location) or are 0 drive block devices.
yes, this is correct.
Eric
Thanks for the detailed analysis,
Jeremy
-------------------------------------------------------
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