mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOSKRNL]
- Create a volatile device tree during 1st stage so the new HAL that's loaded in 2nd stage can do proper enumeration without phantom devices from the old HAL svn path=/trunk/; revision=53694
This commit is contained in:
parent
2817ba1e7e
commit
ff75ae1b72
1 changed files with 9 additions and 4 deletions
|
@ -22,6 +22,7 @@ KGUARDED_MUTEX PpDeviceReferenceTableLock;
|
|||
RTL_AVL_TABLE PpDeviceReferenceTable;
|
||||
|
||||
extern ULONG ExpInitializationPhase;
|
||||
extern BOOLEAN ExpInTextModeSetup;
|
||||
extern BOOLEAN PnpSystemInit;
|
||||
|
||||
/* DATA **********************************************************************/
|
||||
|
@ -1049,6 +1050,10 @@ IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath,
|
|||
/* Assume failure */
|
||||
*Handle = NULL;
|
||||
|
||||
/* Create a volatile device tree in 1st stage so we have a clean slate
|
||||
* for enumeration using the correct HAL (chosen in 1st stage setup) */
|
||||
if (ExpInTextModeSetup) CreateOptions |= REG_OPTION_VOLATILE;
|
||||
|
||||
/* Open root key for device instances */
|
||||
Status = IopOpenRegistryKeyEx(&hParent, NULL, &EnumU, KEY_CREATE_SUB_KEY);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -1143,7 +1148,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
|
|||
&ObjectAttributes,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
REG_OPTION_VOLATILE,
|
||||
NULL);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -2638,7 +2643,7 @@ IopEnumerateDetectedDevices(
|
|||
&ObjectAttributes,
|
||||
0,
|
||||
NULL,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
|
||||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -2654,7 +2659,7 @@ IopEnumerateDetectedDevices(
|
|||
&ObjectAttributes,
|
||||
0,
|
||||
NULL,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
|
||||
NULL);
|
||||
ZwClose(hLevel1Key);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -3898,7 +3903,7 @@ IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject,
|
|||
InitializeObjectAttributes(&ObjectAttributes, &KeyName,
|
||||
OBJ_CASE_INSENSITIVE, *DevInstRegKey, NULL);
|
||||
Status = ZwCreateKey(DevInstRegKey, DesiredAccess, &ObjectAttributes,
|
||||
0, NULL, REG_OPTION_NON_VOLATILE, NULL);
|
||||
0, NULL, ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0, NULL);
|
||||
ZwClose(ObjectAttributes.RootDirectory);
|
||||
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue