summaryrefslogtreecommitdiff
path: root/Kernel/Patches
diff options
context:
space:
mode:
authorHarley Travis <harleytravis123@outlook.com>2026-06-06 19:33:48 -0500
committerHarley Travis <harleytravis123@outlook.com>2026-06-06 19:33:48 -0500
commit245b41456767fce8c72e0a9a66c957fce1d47b9e (patch)
tree32e1c74863fcf75a0e04c361201b11ba8ab7f4a9 /Kernel/Patches
parentca4fa4fae88f159c2f8af0b6f0c5dad7bfe7394e (diff)
downloadtempleos-floppy-driver-245b41456767fce8c72e0a9a66c957fce1d47b9e.tar.gz
Create BlkDevAddFDC.HC
This file adds code for handling floppy block devices to the BlkDevAdd function. It is to be included at the end of the function's switch statement.
Diffstat (limited to 'Kernel/Patches')
-rw-r--r--Kernel/Patches/BlkDevAddFDC.HC21
1 files changed, 21 insertions, 0 deletions
diff --git a/Kernel/Patches/BlkDevAddFDC.HC b/Kernel/Patches/BlkDevAddFDC.HC
new file mode 100644
index 0000000..c0ff7d6
--- /dev/null
+++ b/Kernel/Patches/BlkDevAddFDC.HC
@@ -0,0 +1,21 @@
+case BDT_FLOPPY:
+ dv->dv_signature=DRV_SIGNATURE_VAL;
+ if (!BlkDevInit(bd))
+ dv->dv_signature=0;
+ else {
+ dv->dv_signature=0;
+ if (make_free)
+ dv=DrvMakeFreeSlot(bd->first_drive_let);
+ else
+ dv=DrvMakeFreeSlot(DrvNextFreeLet(bd->first_drive_let))
+ if (bd->heads!=FDCChk(bd))
+ dv->fs_type=FSt_UNKNOWN;
+ else {
+ dv->dv_signature=DRV_SIGNATURE_VAL;
+ dv->bd=bd;
+ dv->drv_offset=0;
+ dv->fs_type=FSt_REDSEA;
+ RedSeaInit(dv);
+ }
+ }
+ break; \ No newline at end of file