Author: cgutman
Date: Mon Aug 15 08:29:22 2011
New Revision: 53261
URL:
http://svn.reactos.org/svn/reactos?rev=53261&view=rev
Log:
[NTOSKRNL]
- Fix a bug in IopCreateResourceListFromRequirements which was triggering a sanity ASSERT
because it forgot to skip conflicting entries
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c [iso-8859-1] Mon Aug 15 08:29:22 2011
@@ -217,6 +217,7 @@
for (ii = 0; ii < ResList->Count; ii++)
{
PIO_RESOURCE_DESCRIPTOR ReqDesc = &ResList->Descriptors[ii];
+ BOOLEAN FoundResource = TRUE;
/* FIXME: Handle alternate ranges */
if (ReqDesc->Option == IO_RESOURCE_ALTERNATIVE)
@@ -240,6 +241,8 @@
*ResourceList = NULL;
return STATUS_CONFLICTING_ADDRESSES;
}
+
+ FoundResource = FALSE;
}
break;
@@ -256,6 +259,8 @@
*ResourceList = NULL;
return STATUS_CONFLICTING_ADDRESSES;
}
+
+ FoundResource = FALSE;
}
break;
@@ -272,6 +277,8 @@
*ResourceList = NULL;
return STATUS_CONFLICTING_ADDRESSES;
}
+
+ FoundResource = FALSE;
}
break;
@@ -288,6 +295,8 @@
*ResourceList = NULL;
return STATUS_CONFLICTING_ADDRESSES;
}
+
+ FoundResource = FALSE;
}
break;
@@ -303,16 +312,22 @@
*ResourceList = NULL;
return STATUS_CONFLICTING_ADDRESSES;
}
+
+ FoundResource = FALSE;
}
break;
default:
DPRINT1("Unsupported resource type: %x\n", ReqDesc->Type);
+ FoundResource = FALSE;
break;
}
- (*ResourceList)->List[0].PartialResourceList.Count++;
- ResDesc++;
+ if (FoundResource)
+ {
+ (*ResourceList)->List[0].PartialResourceList.Count++;
+ ResDesc++;
+ }
}
}