mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- Revert 40694 as FIELD_OFFSET is perfectly working code and the new one might not work on some compilers
- Add informal debug traces for bug 4354 svn path=/trunk/; revision=41285
This commit is contained in:
parent
aed29dde4e
commit
42771ef723
2 changed files with 9 additions and 5 deletions
|
@ -340,11 +340,9 @@ IntVideoPortPnPStartDevice(
|
|||
|
||||
/* Save the resource list */
|
||||
ResourceCount = AllocatedResources->List[0].PartialResourceList.Count;
|
||||
ResourceListSize = sizeof(CM_RESOURCE_LIST);
|
||||
|
||||
if (ResourceCount > 1)
|
||||
ResourceListSize += (ResourceCount-1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
|
||||
|
||||
ResourceListSize =
|
||||
FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.
|
||||
PartialDescriptors[ResourceCount]);
|
||||
DeviceExtension->AllocatedResources = ExAllocatePool(PagedPool, ResourceListSize);
|
||||
if (DeviceExtension->AllocatedResources == NULL)
|
||||
{
|
||||
|
@ -360,6 +358,9 @@ IntVideoPortPnPStartDevice(
|
|||
FullList < AllocatedResources->List + AllocatedResources->Count;
|
||||
FullList++)
|
||||
{
|
||||
INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n",
|
||||
FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision);
|
||||
|
||||
/* FIXME: Is this ASSERT ok for resources from the PNP manager? */
|
||||
ASSERT(FullList->InterfaceType == PCIBus &&
|
||||
FullList->BusNumber == DeviceExtension->SystemIoBusNumber &&
|
||||
|
|
|
@ -520,6 +520,9 @@ VideoPortGetAccessRanges(
|
|||
FullList < AllocatedResources->List + AllocatedResources->Count;
|
||||
FullList++)
|
||||
{
|
||||
INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n",
|
||||
FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision);
|
||||
|
||||
ASSERT(FullList->InterfaceType == PCIBus &&
|
||||
FullList->BusNumber == DeviceExtension->SystemIoBusNumber &&
|
||||
1 == FullList->PartialResourceList.Version &&
|
||||
|
|
Loading…
Reference in a new issue