mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS] Remove some hacks that are not needed anymore, since a real registry hive will be used in 1st-stage as well.
This revertsa7c26408
(r53255) andff75ae1b
(r53694), and a hack from6075ae9a
(r46690). svn path=/branches/setup_improvements/; revision=74745 svn path=/branches/setup_improvements/; revision=74746
This commit is contained in:
parent
c83ac7600d
commit
e2cb7b50b4
5 changed files with 23 additions and 37 deletions
|
@ -401,12 +401,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc
|
|||
NULL,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
&Disposition);
|
||||
if (ExpInTextModeSetup)
|
||||
{
|
||||
if (!NT_SUCCESS(Status))
|
||||
BiosHandle = NULL;
|
||||
}
|
||||
else if (!NT_SUCCESS(Status))
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
NtClose(SystemHandle);
|
||||
return Status;
|
||||
|
|
|
@ -306,12 +306,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc
|
|||
NULL,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
&Disposition);
|
||||
if (ExpInTextModeSetup)
|
||||
{
|
||||
if (!NT_SUCCESS(Status))
|
||||
BiosHandle = NULL;
|
||||
}
|
||||
else if (!NT_SUCCESS(Status))
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
NtClose(SystemHandle);
|
||||
return Status;
|
||||
|
|
|
@ -56,17 +56,6 @@ PiInitCacheGroupInformation(VOID)
|
|||
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)(ULONG_PTR)0xBABEB00BBABEB00BULL;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* Open the registry key */
|
||||
Status = IopOpenRegistryKeyEx(&KeyHandle,
|
||||
NULL,
|
||||
|
|
|
@ -23,7 +23,6 @@ RTL_AVL_TABLE PpDeviceReferenceTable;
|
|||
|
||||
extern ERESOURCE IopDriverLoadResource;
|
||||
extern ULONG ExpInitializationPhase;
|
||||
extern BOOLEAN ExpInTextModeSetup;
|
||||
extern BOOLEAN PnpSystemInit;
|
||||
|
||||
#define MAX_DEVICE_ID_LEN 200
|
||||
|
@ -812,7 +811,13 @@ IopStartDevice(
|
|||
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;
|
||||
|
||||
|
@ -1458,10 +1463,6 @@ 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))
|
||||
|
@ -1555,6 +1556,8 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
|
|||
&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))
|
||||
|
@ -3267,7 +3270,7 @@ IopEnumerateDetectedDevices(
|
|||
&ObjectAttributes,
|
||||
0,
|
||||
NULL,
|
||||
ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -3283,7 +3286,7 @@ IopEnumerateDetectedDevices(
|
|||
&ObjectAttributes,
|
||||
0,
|
||||
NULL,
|
||||
ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
NULL);
|
||||
ZwClose(hLevel1Key);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -3461,7 +3464,7 @@ IopUpdateRootKey(VOID)
|
|||
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);
|
||||
|
@ -3469,7 +3472,7 @@ IopUpdateRootKey(VOID)
|
|||
}
|
||||
|
||||
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))
|
||||
{
|
||||
|
@ -4538,8 +4541,13 @@ IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject,
|
|||
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;
|
||||
|
|
|
@ -284,8 +284,7 @@ IoReportDetectedDevice(IN PDRIVER_OBJECT DriverObject,
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue