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
This commit is contained in:
Kenneth J Davis 2005-01-01 18:03:43 +00:00
parent 89d10726a6
commit ded1a47b81

View File

@ -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 */