mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +00:00
Add a message in case of error when loading/initializing driver
svn path=/trunk/; revision=27386
This commit is contained in:
parent
122331f605
commit
9c03ef676e
2 changed files with 42 additions and 32 deletions
|
@ -290,7 +290,7 @@ NtCreateKey(OUT PHANDLE KeyHandle,
|
||||||
{
|
{
|
||||||
if (L'\\' == RemainingPath.Buffer[i])
|
if (L'\\' == RemainingPath.Buffer[i])
|
||||||
{
|
{
|
||||||
DPRINT1("NtCreateKey() doesn't create trees! (found \'\\\' in remaining path: \"%wZ\"!)\n", &RemainingPath);
|
DPRINT("NtCreateKey() doesn't create trees! (found \'\\\' in remaining path: \"%wZ\"!)\n", &RemainingPath);
|
||||||
|
|
||||||
PostCreateKeyInfo.Object = NULL;
|
PostCreateKeyInfo.Object = NULL;
|
||||||
PostCreateKeyInfo.Status = STATUS_OBJECT_NAME_NOT_FOUND;
|
PostCreateKeyInfo.Status = STATUS_OBJECT_NAME_NOT_FOUND;
|
||||||
|
|
|
@ -2379,45 +2379,55 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Driver is not initialized, try to load it */
|
/* Driver is not initialized, try to load it */
|
||||||
Status = IopLoadServiceModule(&DeviceNode->ServiceName, &ModuleObject);
|
Status = IopLoadServiceModule(&DeviceNode->ServiceName, &ModuleObject);
|
||||||
|
|
||||||
if (NT_SUCCESS(Status) || Status == STATUS_IMAGE_ALREADY_LOADED)
|
if (NT_SUCCESS(Status) || Status == STATUS_IMAGE_ALREADY_LOADED)
|
||||||
{
|
{
|
||||||
/* STATUS_IMAGE_ALREADY_LOADED means this driver
|
/* STATUS_IMAGE_ALREADY_LOADED means this driver
|
||||||
was loaded by the bootloader */
|
was loaded by the bootloader */
|
||||||
if (Status != STATUS_IMAGE_ALREADY_LOADED)
|
if (Status != STATUS_IMAGE_ALREADY_LOADED)
|
||||||
{
|
{
|
||||||
/* Initialize the driver */
|
/* Initialize the driver */
|
||||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject,
|
Status = IopInitializeDriverModule(DeviceNode, ModuleObject,
|
||||||
&DeviceNode->ServiceName, FALSE, &DriverObject);
|
&DeviceNode->ServiceName, FALSE, &DriverObject);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DPRINT1("IopLoadServiceModule(%wZ) failed with status 0x%08x\n",
|
||||||
|
&DeviceNode->ServiceName, Status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Driver is loaded and initialized at this point */
|
/* Driver is loaded and initialized at this point */
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
/* We have a driver for this DeviceNode */
|
||||||
|
DeviceNode->Flags |= DN_DRIVER_LOADED;
|
||||||
|
/* Attach lower level filter drivers. */
|
||||||
|
IopAttachFilterDrivers(DeviceNode, TRUE);
|
||||||
|
/* Initialize the function driver for the device node */
|
||||||
|
Status = IopInitializeDevice(DeviceNode, DriverObject);
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* We have a driver for this DeviceNode */
|
/* Attach upper level filter drivers. */
|
||||||
DeviceNode->Flags |= DN_DRIVER_LOADED;
|
IopAttachFilterDrivers(DeviceNode, FALSE);
|
||||||
/* Attach lower level filter drivers. */
|
IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED);
|
||||||
IopAttachFilterDrivers(DeviceNode, TRUE);
|
|
||||||
/* Initialize the function driver for the device node */
|
|
||||||
Status = IopInitializeDevice(DeviceNode, DriverObject);
|
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
Status = IopStartDevice(DeviceNode);
|
||||||
{
|
|
||||||
/* Attach upper level filter drivers. */
|
|
||||||
IopAttachFilterDrivers(DeviceNode, FALSE);
|
|
||||||
IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED);
|
|
||||||
|
|
||||||
Status = IopStartDevice(DeviceNode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DPRINT1("IopInitializeDevice(%wZ) failed with status 0x%08x\n",
|
||||||
|
&DeviceNode->InstancePath, Status);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue