[ros-diffs] [cgutman] 53694: [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
cgutman at svn.reactos.org
cgutman at svn.reactos.org
Sun Sep 11 17:26:02 UTC 2011
Author: cgutman
Date: Sun Sep 11 17:26:01 2011
New Revision: 53694
URL: http://svn.reactos.org/svn/reactos?rev=53694&view=rev
Log:
[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
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c?rev=53694&r1=53693&r2=53694&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sun Sep 11 17:26:01 2011
@@ -22,6 +22,7 @@
RTL_AVL_TABLE PpDeviceReferenceTable;
extern ULONG ExpInitializationPhase;
+extern BOOLEAN ExpInTextModeSetup;
extern BOOLEAN PnpSystemInit;
/* DATA **********************************************************************/
@@ -1049,6 +1050,10 @@
/* 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 @@
&ObjectAttributes,
0,
NULL,
- 0,
+ REG_OPTION_VOLATILE,
NULL);
if (NT_SUCCESS(Status))
{
@@ -2638,7 +2643,7 @@
&ObjectAttributes,
0,
NULL,
- REG_OPTION_NON_VOLATILE,
+ ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
NULL);
if (!NT_SUCCESS(Status))
{
@@ -2654,7 +2659,7 @@
&ObjectAttributes,
0,
NULL,
- REG_OPTION_NON_VOLATILE,
+ ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
NULL);
ZwClose(hLevel1Key);
if (!NT_SUCCESS(Status))
@@ -3898,7 +3903,7 @@
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;
More information about the Ros-diffs
mailing list