mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 03:05:40 +00:00
[videoprt] Split complicated asserts for easier problem understanding as seen in bug #4354
svn path=/trunk/; revision=44539
This commit is contained in:
parent
c9c03a799f
commit
68a499842a
3 changed files with 18 additions and 12 deletions
|
@ -507,10 +507,16 @@ IntAgpGetInterface(
|
||||||
AgpBusInterface = &DeviceExtension->AgpInterface;
|
AgpBusInterface = &DeviceExtension->AgpInterface;
|
||||||
AgpInterface = (PVIDEO_PORT_AGP_INTERFACE_2)Interface;
|
AgpInterface = (PVIDEO_PORT_AGP_INTERFACE_2)Interface;
|
||||||
|
|
||||||
ASSERT((Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 &&
|
ASSERT(Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 ||
|
||||||
Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
|
Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_1);
|
||||||
(Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_1 &&
|
if (Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2)
|
||||||
Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE)));
|
{
|
||||||
|
ASSERT(Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2));
|
||||||
|
}
|
||||||
|
else if (Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_1)
|
||||||
|
{
|
||||||
|
ASSERT(Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE));
|
||||||
|
}
|
||||||
|
|
||||||
if (DeviceExtension->NextDeviceObject == NULL)
|
if (DeviceExtension->NextDeviceObject == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -361,10 +361,10 @@ IntVideoPortPnPStartDevice(
|
||||||
FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision);
|
FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision);
|
||||||
|
|
||||||
/* FIXME: Is this ASSERT ok for resources from the PNP manager? */
|
/* FIXME: Is this ASSERT ok for resources from the PNP manager? */
|
||||||
ASSERT(FullList->InterfaceType == PCIBus &&
|
ASSERT(FullList->InterfaceType == PCIBus);
|
||||||
FullList->BusNumber == DeviceExtension->SystemIoBusNumber &&
|
ASSERT(FullList->BusNumber == DeviceExtension->SystemIoBusNumber);
|
||||||
1 == FullList->PartialResourceList.Version &&
|
ASSERT(1 == FullList->PartialResourceList.Version);
|
||||||
1 == FullList->PartialResourceList.Revision);
|
ASSERT(1 == FullList->PartialResourceList.Revision);
|
||||||
for (Descriptor = FullList->PartialResourceList.PartialDescriptors;
|
for (Descriptor = FullList->PartialResourceList.PartialDescriptors;
|
||||||
Descriptor < FullList->PartialResourceList.PartialDescriptors + FullList->PartialResourceList.Count;
|
Descriptor < FullList->PartialResourceList.PartialDescriptors + FullList->PartialResourceList.Count;
|
||||||
Descriptor++)
|
Descriptor++)
|
||||||
|
|
|
@ -522,10 +522,10 @@ VideoPortGetAccessRanges(
|
||||||
INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n",
|
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);
|
FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision);
|
||||||
|
|
||||||
ASSERT(FullList->InterfaceType == PCIBus &&
|
ASSERT(FullList->InterfaceType == PCIBus);
|
||||||
FullList->BusNumber == DeviceExtension->SystemIoBusNumber &&
|
ASSERT(FullList->BusNumber == DeviceExtension->SystemIoBusNumber);
|
||||||
1 == FullList->PartialResourceList.Version &&
|
ASSERT(1 == FullList->PartialResourceList.Version);
|
||||||
1 == FullList->PartialResourceList.Revision);
|
ASSERT(1 == FullList->PartialResourceList.Revision);
|
||||||
for (Descriptor = FullList->PartialResourceList.PartialDescriptors;
|
for (Descriptor = FullList->PartialResourceList.PartialDescriptors;
|
||||||
Descriptor < FullList->PartialResourceList.PartialDescriptors + FullList->PartialResourceList.Count;
|
Descriptor < FullList->PartialResourceList.PartialDescriptors + FullList->PartialResourceList.Count;
|
||||||
Descriptor++)
|
Descriptor++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue