mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-21 21:04:43 +02:00
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:
parent
89d10726a6
commit
ded1a47b81
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user