Author: fireball
Date: Mon Jul 10 13:54:50 2006
New Revision: 22992
URL:
http://svn.reactos.org/svn/reactos?rev=22992&view=rev
Log:
- Remove IopGetLowestDevice() call from IoRegisterDeviceInterface() (hpoussin approved
this change)
- Add a few DPRINTs to easier see failures of exported APIs
Modified:
trunk/reactos/ntoskrnl/include/internal/io.h
trunk/reactos/ntoskrnl/io/iomgr/deviface.c
Modified: trunk/reactos/ntoskrnl/include/internal/io.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/io.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/io.h Mon Jul 10 13:54:50 2006
@@ -542,13 +542,7 @@
VOID
);
-PDEVICE_OBJECT
-NTAPI
-IopGetLowestDevice(
- IN PDEVICE_OBJECT DeviceObject
-);
-
-NTSTATUS
+NTSTATUS
INIT_FUNCTION
IopInitPlugPlayEvents(VOID);
Modified: trunk/reactos/ntoskrnl/io/iomgr/deviface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/deviface…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/deviface.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/deviface.c Mon Jul 10 13:54:50 2006
@@ -634,8 +634,10 @@
ASSERT_IRQL(PASSIVE_LEVEL);
+ DPRINT("IoRegisterDeviceInterface(): PDO %p, RefString: %p, SLName: %p\n",
+ PhysicalDeviceObject, ReferenceString, SymbolicLinkName);
+
/* Parameters must pass three border of checks */
- PhysicalDeviceObject = IopGetLowestDevice(PhysicalDeviceObject);
DeviceObjectExtension =
(PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectExtension;
/* 1st level: Presence of a Device Node */
@@ -977,7 +979,10 @@
StartPosition = wcschr(SymbolicLinkName->Buffer, L'{');
EndPosition = wcschr(SymbolicLinkName->Buffer, L'}');
if (!StartPosition ||!EndPosition || StartPosition > EndPosition)
+ {
+ DPRINT("IoSetDeviceInterfaceState() returning
STATUS_INVALID_PARAMETER_1\n");
return STATUS_INVALID_PARAMETER_1;
+ }
GuidString.Buffer = StartPosition;
GuidString.MaximumLength = GuidString.Length = (ULONG_PTR)(EndPosition + 1) -
(ULONG_PTR)StartPosition;
@@ -997,6 +1002,7 @@
&PhysicalDeviceObject);
if (!NT_SUCCESS(Status))
{
+ DPRINT("IoGetDeviceObjectPointer() failed with status 0x%08lx\n",
Status);
ExFreePool(ObjectName.Buffer);
return Status;
}