From ded1a47b8102ca14730ed42cd9b1b35fbd87c6e2 Mon Sep 17 00:00:00 2001 From: Kenneth J Davis Date: Sat, 1 Jan 2005 18:03:43 +0000 Subject: [PATCH] bug 1850, properly handle block drivers failing just by returning no units git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1084 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/main.c b/kernel/main.c index 29a0a2e..586a61f 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -570,6 +570,14 @@ BOOL init_device(struct dhdr FAR * dhp, char *cmdLine, COUNT mode, if (rq.r_endaddr == (BYTE FAR *) dhp) return TRUE; + /* Don't link in block device drivers which indicate no units */ + if (!(dhp->dh_attr & ATTR_CHAR) && !rq.r_nunits) + { + rq.r_endaddr = (BYTE FAR *) dhp; + return TRUE; + } + + /* Fix for multisegmented device drivers: */ /* If there are multiple device drivers in a single driver file, */ /* only the END ADDRESS returned by the last INIT call should be */