mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
Implement IopReinitializeBootDrivers, on the model of IopReinitializeDrivers
svn path=/trunk/; revision=22773
This commit is contained in:
parent
bd7e79620d
commit
1dc3c727a1
3 changed files with 55 additions and 4 deletions
|
@ -810,6 +810,12 @@ IopReinitializeDrivers(
|
|||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
IopReinitializeBootDrivers(
|
||||
VOID
|
||||
);
|
||||
|
||||
//
|
||||
// File Routines
|
||||
//
|
||||
|
|
|
@ -79,7 +79,7 @@ LdrProcessModule(PVOID ModuleLoadBase,
|
|||
PUNICODE_STRING ModuleName,
|
||||
PLDR_DATA_TABLE_ENTRY *ModuleObject);
|
||||
|
||||
VOID
|
||||
static VOID
|
||||
FASTCALL
|
||||
INIT_FUNCTION
|
||||
IopDisplayLoadingMessage(PVOID ServiceName,
|
||||
|
@ -493,8 +493,6 @@ IopLoadServiceModule(
|
|||
DPRINT("RtlQueryRegistryValues() failed (Status %x)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
//IopDisplayLoadingMessage(ServiceName->Buffer, TRUE);
|
||||
|
||||
/*
|
||||
* Normalize the image path for all later processing.
|
||||
|
@ -1702,6 +1700,50 @@ IopReinitializeDrivers(VOID)
|
|||
}
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
IopReinitializeBootDrivers(VOID)
|
||||
{
|
||||
PDRIVER_REINIT_ITEM ReinitItem;
|
||||
PLIST_ENTRY Entry;
|
||||
KIRQL Irql;
|
||||
|
||||
KeAcquireSpinLock(&DriverBootReinitListLock,
|
||||
&Irql);
|
||||
|
||||
DriverBootReinitTailEntry = IsListEmpty(&DriverBootReinitListHead) ? NULL : DriverBootReinitListHead.Blink;
|
||||
Entry = DriverBootReinitTailEntry;
|
||||
|
||||
KeReleaseSpinLock(&DriverBootReinitListLock,
|
||||
Irql);
|
||||
|
||||
if (Entry == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
Entry = ExInterlockedRemoveHeadList(&DriverBootReinitListHead,
|
||||
&DriverBootReinitListLock);
|
||||
if (Entry == NULL)
|
||||
return;
|
||||
|
||||
ReinitItem = (PDRIVER_REINIT_ITEM)CONTAINING_RECORD(Entry, DRIVER_REINIT_ITEM, ItemEntry);
|
||||
|
||||
/* Increment reinitialization counter */
|
||||
ReinitItem->DriverObject->DriverExtension->Count++;
|
||||
|
||||
ReinitItem->ReinitRoutine(ReinitItem->DriverObject,
|
||||
ReinitItem->Context,
|
||||
ReinitItem->DriverObject->DriverExtension->Count);
|
||||
|
||||
ExFreePool(Entry);
|
||||
|
||||
if (Entry == DriverBootReinitTailEntry)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||
|
||||
|
||||
|
@ -2110,7 +2152,7 @@ IoRegisterBootDriverReinitialization(
|
|||
ExInterlockedInsertTailList(
|
||||
&DriverBootReinitListHead,
|
||||
&ReinitItem->ItemEntry,
|
||||
&DriverReinitListLock);
|
||||
&DriverBootReinitListLock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -470,6 +470,9 @@ IoInit3(VOID)
|
|||
IopInitializeSystemDrivers();
|
||||
IoDestroyDriverList();
|
||||
|
||||
/* Call back drivers that asked for */
|
||||
IopReinitializeBootDrivers();
|
||||
|
||||
/* Stop boot logging */
|
||||
IopStopBootLog();
|
||||
|
||||
|
|
Loading…
Reference in a new issue