FreeDOS/kernel
Bernd Boeckmann c08313ab62 fix issue #144 by correcting getbpb return code
getbpb now returns 0 instead of S_DONE in case of an uninitialized
partition, copying the default BPB into the BPB.

The previous return of S_DONE in case of uninitialized partitions
resulted in rp->r_bpptr not getting set in bldbpb. This in
combination with indicating success resulted in garbage returned
via rp->r_bpptr.

The DPB values are now being set to the default BPB ones in media_check
ea951d8136/kernel/fatfs.c (L1728)
via call to bpb_to_dpb in case of an uninitialized partition.
This may have side effects. But because DF_NOACCESS is still set, I
think it is the right way to do it.

The commit also masks high bit of AL for INT25/26 containing the drive
number. Some programs may set the bit according to RBIL:

"examination of CPWIN386.CPL indicates that if this call fails with
error 0408h on an old-style (<32M) call, one should retry the
call with the high bit of the drive number in AL set"

Leaving the bit set may render the given drive number unusable.
It should do no harm to mask it to increase the chance of the operation
to succeed. Also, the AH should be set to zero, because drive is given
only in AL.
2024-03-05 16:35:31 -05:00
..
nls FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
apisupt.asm FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
asmsupt.asm config: delete existing variable before writing new contents 2023-08-30 06:59:41 -04:00
blockio.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
break.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
chario.c read_line: skip characters > 255 2021-05-11 21:45:38 -04:00
config.c fix bug#121 don't look for 123? unless still looking for verb at start of line 2024-02-04 20:37:43 -05:00
config.h FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
console.asm allow selection of COM port for debug prints easily overridden during compile, e.g. build.bat /D DEBUG_PRINT_COMPORT /V 2 2024-02-10 17:36:33 -05:00
cpu.asm correct xor to test not clear value, invert test so 808x is 0 and NEC is 1 matching returned value 2024-02-04 19:43:09 -05:00
dosfns.c DosGetExtFree: Use new redirector function 11a3 2023-03-21 20:54:17 -04:00
dosidle.asm ia16-elf-gcc port: compile all asm files with -f elf. 2018-01-11 17:50:31 -05:00
dsk.c fix issue #144 by correcting getbpb return code 2024-03-05 16:35:31 -05:00
dyndata.h FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
dyninit.c ia16-elf-gcc: enable and fix basic warnings; don't do strict ptr aliasing for now 2018-01-11 17:50:31 -05:00
entry.asm _winInstanced is only used when compiled with WIN31SUPPORT, fix build error on CI 2021-08-19 14:16:50 -04:00
error.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
execrh.asm Introduce popargs and arg macros to distinguish PASCAL/STDCALL conventions. 2018-01-11 17:50:31 -05:00
fatdir.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
fatfs.c fatfs.c: allow bpbSectorsPerCluster == 0 to mean 256 2023-01-04 19:38:57 -05:00
fattab.c C source code changes so the kernel can compile with ia16-elf-gcc. 2018-01-11 17:50:31 -05:00
fcbfns.c FCB (int 21h func 29h): should not accept field separator as "drive letter" 2022-07-16 07:20:24 -04:00
globals.h Implement version table support for int21/ah=4b, subfunctions 0 and 1 2021-03-10 22:21:19 -05:00
init-dat.h ia16-elf-gcc: eliminate DOSDATA, DOSTEXT and C use of TGROUP. 2018-07-12 14:27:03 -04:00
init-mod.h config: build master environment during FDCONFIG.SYS processing 2023-07-03 07:37:00 -04:00
initclk.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
initdisk.c initdisk.c: format specifier fixes 2 2024-02-04 20:44:19 -05:00
inithma.c add some comments regarding relocation of kernel during configuration 2024-02-10 17:38:19 -05:00
initoem.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
int2f.asm DosGetExtFree: Use new redirector function 11a3 2023-03-21 20:54:17 -04:00
inthndlr.c fix issue #144 by correcting getbpb return code 2024-03-05 16:35:31 -05:00
intr.asm rework to make handling flags simpler, from ecm 2024-02-10 17:34:00 -05:00
io.asm ia16-elf-gcc port: compile all asm files with -f elf. 2018-01-11 17:50:31 -05:00
io.inc ia16-elf-gcc port: compile all asm files with -f elf. 2018-01-11 17:50:31 -05:00
ioctl.c int 21h/4400h only return low byte of SFT flags if not a device, part of dosemu2/fdpp bug #147 fix - b2b55fc1af 2021-07-22 22:31:45 -04:00
iprf.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
irqstack.asm FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
kernel.asm rework update_dcb() to avoid potential access uninitialized memory 2024-02-03 22:00:17 -05:00
kernel.cfg FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
kernel.ld config: delete existing variable before writing new contents 2023-08-30 06:59:41 -04:00
lfnapi.c build fixes - update inthndlr.c to compile with LFNAPI enabled (more fixes from earlier oops, lfnapi.c still doesn't compile) 2021-08-08 14:26:34 -04:00
ludivmul.inc Implement suggested instead of minimal fix for ludivmul. 2018-09-06 10:30:04 -04:00
main.c add some comments regarding relocation of kernel during configuration 2024-02-10 17:38:19 -05:00
makefile Build: Country submodule now has production target 2024-02-24 17:38:14 +00:00
memdisk.asm FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
memmgr.c C source code changes so the kernel can compile with ia16-elf-gcc. 2018-01-11 17:50:31 -05:00
misc.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
network.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
newstuff.c truename: fix array overrun (pick from fdpp) 2023-08-26 21:32:19 -04:00
nls_hc.asm ia16-elf-gcc port: compile all asm files with -f elf. 2018-01-11 17:50:31 -05:00
nls_load.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
nls.c int2f: fix call interface around syscall_MUX14( ) (inthndlr.c) 2019-12-09 06:23:12 -05:00
nlssupt.asm FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
prf.c move FAR item to own line 2024-02-11 08:59:32 -05:00
printer.asm FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
procsupt.asm ia16-elf-gcc port: compile all asm files with -f elf. 2018-01-11 17:50:31 -05:00
proto.h DosGetExtFree: Use new redirector function 11a3 2023-03-21 20:54:17 -04:00
segs.inc ia16-elf-gcc port: compile all asm files with -f elf. 2018-01-11 17:50:31 -05:00
serial.asm ia16-elf-gcc port: compile all asm files with -f elf. 2018-01-11 17:50:31 -05:00
strings.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
sysclk.c ia16-elf-gcc port: use CDECL = __attribute__((cdecl)) instead of varargs. 2018-07-12 10:56:26 -04:00
syspack.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
systime.c FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00
task.c task: return Invalid format on empty executable (fixes #70) 2022-05-21 23:22:08 -04:00
turboc.cfg FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00