Skip to content

Commit d058739

Browse files
committed
mfs: support lredir up to LASTDRIVE=32 in MS-DOS v7 and lDOS
lredir actually already worked to create or delete drives up to and including drive `: but beyond [: they were inaccessible. [: itself worked only partially (probably no int 2Fh function 110Ch). Now mfs supports all possible drives as desired. This requires setting eg LASTDRIVE=32 in config.sys or ldos.ini, or for lDOS only running with `append lastdrive 32` in the kernel command line. Test cases: C:\>type testmfs.bat lredir %1: /home/[user]/proj/devload lredir dir %1: lredir -d %1: The DIR command in this batch file requires the FreeCOM patch in FDOS/freecom#180 Different test case: ldebug ext extlib.eld dosspace `: This runs DOS interrupt 21h function 36h, which in turn calls int 2Fh function 110Ch. Some uses of the very last drive letter, `:, require a patch for working under MS-DOS v7: https://pushbx.org/ecm/test/20250926.3/
1 parent 59b19ff commit d058739

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dosext/mfs/mfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Andrew.Tridgell@anu.edu.au 30th March 1993
1515
#define d_namlen d_reclen
1616
#endif
1717

18-
#define MAX_DRIVE 26
18+
#define MAX_DRIVE 32
1919
#define PRINTER_BASE_DRIVE MAX_DRIVE
2020
#define MAX_PRINTER 9
2121

src/dosext/mfs/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ int get_drive_from_path(char *path, int *drive)
223223
return 0;
224224

225225
c = toupper(path[0]);
226-
if (c < 'A' || c > 'Z' || path[1] != ':')
226+
if (c < 'A' || c > '`' || path[1] != ':')
227227
return 0;
228228

229229
*drive = c - 'A';

0 commit comments

Comments
 (0)