mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
[NTOSKRNL]
- Add prints to unloading functions because things seem very wonky here - This exposes some previously unknown behavior of fastfat actually being unloaded in early boot (with uniata and buslogic failing unload due to missing DriverUnload) svn path=/trunk/; revision=55773
This commit is contained in:
parent
177a18b44b
commit
b0965ffa70
|
@ -364,6 +364,13 @@ IopUnloadDevice(IN PDEVICE_OBJECT DeviceObject)
|
|||
PDEVICE_NODE DeviceNode;
|
||||
BOOLEAN SafeToUnload = TRUE;
|
||||
|
||||
/* We can't unload unless there's an unload handler */
|
||||
if (!DriverObject->DriverUnload)
|
||||
{
|
||||
DPRINT1("No DriverUnload function! '%wZ' will not be unloaded!\n", &DriverObject->DriverName);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if removal is pending */
|
||||
ThisExtension = IoGetDevObjExtension(DeviceObject);
|
||||
if (ThisExtension->ExtensionFlags & DOE_REMOVE_PENDING)
|
||||
|
@ -463,11 +470,13 @@ IopUnloadDevice(IN PDEVICE_OBJECT DeviceObject)
|
|||
DeviceObject = DeviceObject->NextDevice;
|
||||
}
|
||||
|
||||
DPRINT1("Unloading driver '%wZ' (automatic)\n", &DriverObject->DriverName);
|
||||
|
||||
/* Set the unload invoked flag */
|
||||
DriverObject->Flags |= DRVO_UNLOAD_INVOKED;
|
||||
|
||||
/* Unload it */
|
||||
if (DriverObject->DriverUnload) DriverObject->DriverUnload(DriverObject);
|
||||
DriverObject->DriverUnload(DriverObject);
|
||||
|
||||
/* Make object temporary so it can be deleted */
|
||||
ObMakeTemporaryObject(DriverObject);
|
||||
|
|
|
@ -58,6 +58,8 @@ IopDeleteDriver(IN PVOID ObjectBody)
|
|||
PIO_CLIENT_EXTENSION DriverExtension, NextDriverExtension;
|
||||
PAGED_CODE();
|
||||
|
||||
DPRINT1("Deleting driver object '%wZ'\n", &DriverObject->DriverName);
|
||||
|
||||
/* Get the extension and loop them */
|
||||
DriverExtension = IoGetDrvObjExtension(DriverObject)->
|
||||
ClientDriverExtension;
|
||||
|
@ -1284,6 +1286,8 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
DPRINT1("Unloading driver '%wZ' (manual)\n", &DriverObject->DriverName);
|
||||
|
||||
/* Set the unload invoked flag */
|
||||
DriverObject->Flags |= DRVO_UNLOAD_INVOKED;
|
||||
|
||||
|
@ -1323,6 +1327,8 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
|
|||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("No DriverUnload function! '%wZ' will not be unloaded!\n", &DriverObject->DriverName);
|
||||
|
||||
/* Dereference one time (refd inside this function) */
|
||||
ObDereferenceObject(DriverObject);
|
||||
|
||||
|
|
Loading…
Reference in a new issue