From edd15150f34b040d5ab68a1b418705c0de895a1e Mon Sep 17 00:00:00 2001 From: Harley Travis Date: Sat, 20 Jun 2026 20:00:32 -0500 Subject: Re-arrange patch files Some of the patches are applied to files in subdirectories of ::/Kernel and ::/Adam. The directory tree has been re-arranged in such a way as to allow them to be #included without having the compiler backtrack to their parent directory. --- Kernel/BlkDev/Patches/BlkDevAddFDC.HC | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Kernel/BlkDev/Patches/BlkDevAddFDC.HC (limited to 'Kernel/BlkDev/Patches/BlkDevAddFDC.HC') diff --git a/Kernel/BlkDev/Patches/BlkDevAddFDC.HC b/Kernel/BlkDev/Patches/BlkDevAddFDC.HC new file mode 100644 index 0000000..1f9e75a --- /dev/null +++ b/Kernel/BlkDev/Patches/BlkDevAddFDC.HC @@ -0,0 +1,28 @@ +// PATCH: Add the ability to create floppy drvs +// FILE: ::/Kernel/BlkDev/DskAddDev.HC +// TO INSTALL: #include this file at the end of the switch statement. + +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 { + FDCReadBlks(bd,&br,0,1); + if (br.signature==MBR_PT_REDSEA && br.signature2==0xAA55) { + dv->dv_signature=DRV_SIGNATURE_VAL; + dv->bd=bd; + dv->fs_type=FSt_REDSEA; + RedSeaInit(dv); + } else + dv->fs_type=FSt_UNKNOWN; + } + } + break; \ No newline at end of file -- cgit v1.2.3