Re: New Kernel Bug (a small one)

Bart Oldeman <[email protected]>
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
Hi,

well this turned out to be really a bug in NDN and not the kernel.

NDN does:

INT21 (0) at 456b:0207: AX=4409, BX=0043, CX=004c, DX=6143, DS=297f, ES=3771
check if block device remote

Here it has 0x43 in BL which corresponds, following RBIL, to drive
0x40+0x43=0x83. 0x83 gives you that weird looking drive letter.

So the FreeDOS kernel says that the drive is out of range and NDN
investigates this as a critical error. The same happens with MSDOS 7.1
(aka Win98 DOS) and DRDOS 7.03 btw. I'm not sure about other DOSes.

Now we can easily work around this:

--- ke2027rc/kernel/ioctl.c	Mon Oct 21 22:40:18 2002
+++ ke2027/kernel/ioctl.c	Mon Oct 28 22:05:20 2002
@@ -199,7 +199,8 @@
 /* JPP - changed to use default drive if drive=0 */
 /* JT Fixed it */

-      CharReqHdr.r_unit = (r->BL == 0 ? default_drive : r->BL - 1);
+      CharReqHdr.r_unit = ((r->BL & 0x1f) == 0 ? default_drive :
+                           (r->BL & 0x1f) - 1);

       dpbp = get_dpb(CharReqHdr.r_unit);

But I'm not sure if this is a good idea ... We want MSDOS
compatibility, not broken DOS utility compatibility.

In the changelog at http://www.necromancer.newmail.ru/ I read for the 2.03
prerelease:

- Critical Error on drive ? bug fixed (at least in my machine)

Indeed they had this bug in NDN. Any opinions?

Bart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.