Hi,

here's a patch which fixes a problem where drives > E: aren't properly initialized with a full CDS entry until after all device drivers are loaded.

RBIL actually says about lastdrive:

 21h    BYTE    number of available drive letters; also size of current
                  directory structure array.
                For DOS 4.0-6.0: largest of 5, installed block devices,
                  and CONFIG.SYS LASTDRIVE=
                For DOS 7.x (Windows9X), set to 32 if no LASTDRIVE= or
                  LASTDRIVEHIGH=, else set to larger of installed block
                  devices and LASTDRIVE(HIGH)=

we always use the 4.0-6.0 method. Technically the FAT32-enabled kernel should emulate the DOS 7.x behaviour, and the other one 5.0 behaviour.
But perhaps 7.x behaviour is desirable at all times?

Another thing on my wishlist is an
INCLUDE=filename
in config.sys so config.sys can include other files. But that's for later.

Bart

--- main.c.~1.83.~      2005-05-01 19:59:26.000000000 +1200
+++ main.c      2005-09-11 17:49:53.000000000 +1200
@@ -298,7 +298,9 @@

   /* Do first initialization of system variable buffers so that   */
   /* we can read config.sys later.  */
-  LoL->lastdrive = Config.cfgLastdrive;
+
+  /* use largest possible value for the initial CDS */
+  LoL->lastdrive = 26;

   /*  init_device((struct dhdr FAR *)&blk_dev, NULL, 0, &ram_top); */
   blk_dev.dh_name[0] = dsk_init();


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to