mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
Implement partly IoReportResourceForDetection() and IoReportDetectedDevice(), just enough to support serial driver
svn path=/trunk/; revision=14178
This commit is contained in:
parent
08da4a07b0
commit
301637bbde
1 changed files with 25 additions and 6 deletions
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
/* INCLUDES ******************************************************************/
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
|
//#define NDEBUG
|
||||||
#include <ntoskrnl.h>
|
#include <ntoskrnl.h>
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
|
||||||
|
@ -30,8 +31,25 @@ IoReportDetectedDevice(
|
||||||
IN BOOLEAN ResourceAssigned,
|
IN BOOLEAN ResourceAssigned,
|
||||||
IN OUT PDEVICE_OBJECT *DeviceObject)
|
IN OUT PDEVICE_OBJECT *DeviceObject)
|
||||||
{
|
{
|
||||||
DPRINT("IoReportDetectedDevice called (UNIMPLEMENTED)\n");
|
PDEVICE_NODE DeviceNode;
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
DPRINT("IoReportDetectedDevice called (partly implemented)\n");
|
||||||
|
/* Use IopRootDeviceNode for now */
|
||||||
|
Status = IopCreateDeviceNode(IopRootDeviceNode, NULL, &DeviceNode);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("IopCreateDeviceNode() failed (Status 0x%08x)\n", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = IopInitializePnpServices(DeviceNode, FALSE);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("IopInitializePnpServices() failed (Status 0x%08x)\n", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
return IopInitializeDevice(DeviceNode, DriverObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -48,8 +66,9 @@ IoReportResourceForDetection(
|
||||||
IN ULONG DeviceListSize OPTIONAL,
|
IN ULONG DeviceListSize OPTIONAL,
|
||||||
OUT PBOOLEAN ConflictDetected)
|
OUT PBOOLEAN ConflictDetected)
|
||||||
{
|
{
|
||||||
DPRINT("IoReportResourceForDetection called (UNIMPLEMENTED)\n");
|
DPRINT("IoReportResourceForDetection UNIMPLEMENTED but returns success.\n");
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
*ConflictDetected = FALSE;
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -61,7 +80,7 @@ IoReportTargetDeviceChange(
|
||||||
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
||||||
IN PVOID NotificationStructure)
|
IN PVOID NotificationStructure)
|
||||||
{
|
{
|
||||||
DPRINT("IoReportTargetDeviceChange called (UNIMPLEMENTED)\n");
|
DPRINT1("IoReportTargetDeviceChange called (UNIMPLEMENTED)\n");
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +95,7 @@ IoReportTargetDeviceChangeAsynchronous(
|
||||||
IN PDEVICE_CHANGE_COMPLETE_CALLBACK Callback OPTIONAL,
|
IN PDEVICE_CHANGE_COMPLETE_CALLBACK Callback OPTIONAL,
|
||||||
IN PVOID Context OPTIONAL)
|
IN PVOID Context OPTIONAL)
|
||||||
{
|
{
|
||||||
DPRINT("IoReportTargetDeviceChangeAsynchronous called (UNIMPLEMENTED)\n");
|
DPRINT1("IoReportTargetDeviceChangeAsynchronous called (UNIMPLEMENTED)\n");
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue