Author: hbelusca
Date: Fri Jun 2 15:37:56 2017
New Revision: 74745
URL:
http://svn.reactos.org/svn/reactos?rev=74745&view=rev
Log:
[NTOS]: Remove some hacks that I don't need anymore in the branch (since I'll also
use for 1st-stage a real registry hive). This reverts r53255 and r53694, and a hack from
r46690.
Modified:
branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpinit.c
branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpmgr.c
branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpreport.c
Modified: branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpinit.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/ntoskrnl/io/…
==============================================================================
--- branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] (original)
+++ branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] Fri Jun 2
15:37:56 2017
@@ -55,17 +55,6 @@
UNICODE_STRING GroupString =
RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet"
L"\\Control\\ServiceGroupOrder");
-
- /* ReactOS HACK for SETUPLDR */
- if (KeLoaderBlock->SetupLdrBlock)
- {
- DPRINT1("WARNING!! In PiInitCacheGroupInformation, using ReactOS HACK for
SETUPLDR!!\n");
-
- /* Bogus data */
- PiInitGroupOrderTableCount = 0;
- PiInitGroupOrderTable = (PVOID)0xBABEB00B;
- return STATUS_SUCCESS;
- }
/* Open the registry key */
Status = IopOpenRegistryKeyEx(&KeyHandle,
Modified: branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/ntoskrnl/io/…
==============================================================================
--- branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Fri Jun 2
15:37:56 2017
@@ -23,7 +23,6 @@
extern ERESOURCE IopDriverLoadResource;
extern ULONG ExpInitializationPhase;
-extern BOOLEAN ExpInTextModeSetup;
extern BOOLEAN PnpSystemInit;
/* DATA **********************************************************************/
@@ -94,7 +93,7 @@
PWCHAR IdBuffer, OriginalIdBuffer;
/* Open the device instance key */
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0,
&InstanceKey);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath,
REG_OPTION_NON_VOLATILE, &InstanceKey);
if (Status != STATUS_SUCCESS)
return;
@@ -796,7 +795,7 @@
IopStartAndEnumerateDevice(DeviceNode);
/* FIX: Should be done in new device instance code */
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0,
&InstanceHandle);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath,
REG_OPTION_NON_VOLATILE, &InstanceHandle);
if (!NT_SUCCESS(Status))
goto ByeBye;
@@ -808,7 +807,13 @@
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
InstanceHandle,
NULL);
- Status = ZwCreateKey(&ControlHandle, KEY_SET_VALUE, &ObjectAttributes, 0,
NULL, REG_OPTION_VOLATILE, NULL);
+ Status = ZwCreateKey(&ControlHandle,
+ KEY_SET_VALUE,
+ &ObjectAttributes,
+ 0,
+ NULL,
+ REG_OPTION_VOLATILE,
+ NULL);
if (!NT_SUCCESS(Status))
goto ByeBye;
@@ -869,7 +874,7 @@
else
DeviceNode->UserFlags &= ~DNUF_DONT_SHOW_IN_UI;
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0,
&InstanceKey);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath,
REG_OPTION_NON_VOLATILE, &InstanceKey);
if (NT_SUCCESS(Status))
{
/* Set 'Capabilities' value */
@@ -1447,10 +1452,6 @@
/* 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))
@@ -1545,6 +1546,8 @@
&ObjectAttributes,
0,
NULL,
+ // FIXME? In r53694 it was silently turned from non-volatile into
this,
+ // without any extra warning. Is this still needed??
REG_OPTION_VOLATILE,
NULL);
if (NT_SUCCESS(Status))
@@ -1608,8 +1611,13 @@
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
InstanceKey,
NULL);
- Status = ZwCreateKey(&ControlHandle, 0, &ObjectAttributes, 0, NULL,
REG_OPTION_VOLATILE, NULL);
-
+ Status = ZwCreateKey(&ControlHandle,
+ KEY_ALL_ACCESS,
+ &ObjectAttributes,
+ 0,
+ NULL,
+ REG_OPTION_VOLATILE,
+ NULL);
if (NT_SUCCESS(Status))
ZwClose(ControlHandle);
@@ -2127,7 +2135,7 @@
/*
* Create registry key for the instance id, if it doesn't exist yet
*/
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0,
&InstanceKey);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath,
REG_OPTION_NON_VOLATILE, &InstanceKey);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to create the instance key! (Status %lx)\n", Status);
@@ -3112,7 +3120,7 @@
&ObjectAttributes,
0,
NULL,
- ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
+ REG_OPTION_NON_VOLATILE,
NULL);
if (!NT_SUCCESS(Status))
{
@@ -3128,7 +3136,7 @@
&ObjectAttributes,
0,
NULL,
- ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
+ REG_OPTION_NON_VOLATILE,
NULL);
ZwClose(hLevel1Key);
if (!NT_SUCCESS(Status))
@@ -3306,7 +3314,7 @@
NTSTATUS Status;
InitializeObjectAttributes(&ObjectAttributes, &EnumU, OBJ_KERNEL_HANDLE |
OBJ_CASE_INSENSITIVE, NULL, NULL);
- Status = ZwCreateKey(&hEnum, KEY_CREATE_SUB_KEY, &ObjectAttributes, 0, NULL,
0, NULL);
+ Status = ZwCreateKey(&hEnum, KEY_CREATE_SUB_KEY, &ObjectAttributes, 0, NULL,
REG_OPTION_NON_VOLATILE, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("ZwCreateKey() failed with status 0x%08lx\n", Status);
@@ -3314,7 +3322,7 @@
}
InitializeObjectAttributes(&ObjectAttributes, &RootPathU, OBJ_KERNEL_HANDLE |
OBJ_CASE_INSENSITIVE, hEnum, NULL);
- Status = ZwCreateKey(&hRoot, KEY_CREATE_SUB_KEY, &ObjectAttributes, 0, NULL,
0, NULL);
+ Status = ZwCreateKey(&hRoot, KEY_CREATE_SUB_KEY, &ObjectAttributes, 0, NULL,
REG_OPTION_NON_VOLATILE, NULL);
ZwClose(hEnum);
if (!NT_SUCCESS(Status))
{
@@ -4382,8 +4390,13 @@
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
*DevInstRegKey,
NULL);
- Status = ZwCreateKey(DevInstRegKey, DesiredAccess, &ObjectAttributes,
- 0, NULL, ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0, NULL);
+ Status = ZwCreateKey(DevInstRegKey,
+ DesiredAccess,
+ &ObjectAttributes,
+ 0,
+ NULL,
+ REG_OPTION_NON_VOLATILE,
+ NULL);
ZwClose(ObjectAttributes.RootDirectory);
return Status;
Modified: branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpreport.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/ntoskrnl/io/…
==============================================================================
--- branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] (original)
+++ branches/setup_improvements/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] Fri Jun 2
15:37:56 2017
@@ -252,8 +252,7 @@
IopActionConfigureChildServices(DeviceNode, DeviceNode->Parent);
/* Open a handle to the instance path key */
- /* REG_OPTION_VOLATILE is a HACK!!! */
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath,
REG_OPTION_VOLATILE, &InstanceKey);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath,
REG_OPTION_NON_VOLATILE, &InstanceKey);
if (!NT_SUCCESS(Status))
return Status;