From 41031d408dd09c5c8a219c12beea6fe3c97cfca8 Mon Sep 17 00:00:00 2001 From: Greg Haerr Date: Mon, 9 Oct 2023 16:29:23 -0700 Subject: [PATCH] [direct floppy] Assume 360k floppy if no CMOS drives set --- elks/arch/i86/drivers/block/directfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elks/arch/i86/drivers/block/directfd.c b/elks/arch/i86/drivers/block/directfd.c index 481144bae..73c3a91b3 100644 --- a/elks/arch/i86/drivers/block/directfd.c +++ b/elks/arch/i86/drivers/block/directfd.c @@ -1276,8 +1276,8 @@ static unsigned char * INITPROC find_base(int drive, int type) static void INITPROC config_types(void) { printk("df: CMOS "); - base_type[0] = find_base(0, (CMOS_READ(0x10) >> 4) & 0xF); - //base_type[0] = find_base(0, CMOS_360k); /* force 360k FIXME add setup table */ + if (!(base_type[0] = find_base(0, (CMOS_READ(0x10) >> 4) & 0xF))) + base_type[0] = find_base(0, CMOS_360k); /* use 360k if no CMOS */ if (((CMOS_READ(0x14) >> 6) & 1) != 0) { printk(", "); base_type[1] = find_base(1, CMOS_READ(0x10) & 0xF);