[ros-diffs] [fireball] 19964: Respect the fact,
that the driver can return NULL-pointer,
instead of a string having 0 characters!
fireball at svn.reactos.com
fireball at svn.reactos.com
Thu Dec 8 12:54:05 CET 2005
Respect the fact, that the driver can return NULL-pointer, instead of a
string having 0 characters!
(makes third-party drivers compatibility better).
This piece left from previous commit.
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
_____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
--- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-12-08 10:30:08 UTC (rev
19963)
+++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-12-08 11:54:01 UTC (rev
19964)
@@ -1857,7 +1857,7 @@
}
else
{
- DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status);
+ DPRINT("IopInitiatePnpIrp() failed (Status %x) or
IoStatusBlock.Information=NULL\n", Status);
DeviceNode->BootResources = NULL;
}
@@ -1868,14 +1868,14 @@
&IoStatusBlock,
IRP_MN_QUERY_RESOURCE_REQUIREMENTS,
NULL);
- if (NT_SUCCESS(Status))
+ if (NT_SUCCESS(Status) && IoStatusBlock.Information)
{
DeviceNode->ResourceRequirements =
(PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information;
}
else
{
- DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status);
+ DPRINT("IopInitiatePnpIrp() failed (Status %x) or
IoStatusBlock.Information=NULL\n", Status);
DeviceNode->ResourceRequirements = NULL;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051208/cc683d17/attachment.html
More information about the Ros-diffs
mailing list