From 62ae426e15fddadc0fdded71dccac55cdd5da0c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 10 Jul 2014 09:05:37 +0000 Subject: [PATCH] [NTOSKRNL] - Partial revert of r63700 on Alex's request - This cancels the "Use ZwSetValueKey" instead of NtSetValueKey" part Oddly enough, it doesn't cause a problem anymore. I must have messed up in my initial testings svn path=/trunk/; revision=63705 --- reactos/ntoskrnl/config/cmconfig.c | 6 +++--- reactos/ntoskrnl/config/cmsysini.c | 23 +++++++++++----------- reactos/ntoskrnl/config/i386/cmhardwr.c | 22 ++++++++++----------- reactos/ntoskrnl/config/powerpc/cmhardwr.c | 22 ++++++++++----------- reactos/ntoskrnl/ex/init.c | 4 ++-- reactos/ntoskrnl/io/iomgr/bootlog.c | 2 +- 6 files changed, 39 insertions(+), 40 deletions(-) diff --git a/reactos/ntoskrnl/config/cmconfig.c b/reactos/ntoskrnl/config/cmconfig.c index 95ddcbe6802..a0f66ac9a7a 100644 --- a/reactos/ntoskrnl/config/cmconfig.c +++ b/reactos/ntoskrnl/config/cmconfig.c @@ -97,7 +97,7 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, /* Setup the component information key */ RtlInitUnicodeString(&ValueName, L"Component Information"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_BINARY, @@ -124,7 +124,7 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, if (NT_SUCCESS(Status)) { /* Save the identifier in the registry */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -178,7 +178,7 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, CmpConfigurationData->BusNumber = BusNumber; /* Save the actual data */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_FULL_RESOURCE_DESCRIPTOR, diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index 954e3488715..f41d27b042c 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -416,7 +416,7 @@ CmpSetSystemValues(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Key opened, now write to the key */ RtlInitUnicodeString(&KeyName, L"SystemStartOptions"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &KeyName, 0, REG_SZ, @@ -427,7 +427,7 @@ CmpSetSystemValues(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Setup value name for system boot device in ARC format */ RtlInitUnicodeString(&KeyName, L"SystemBootDevice"); RtlCreateUnicodeStringFromAsciiz(&ValueName, LoaderBlock->ArcBootDeviceName); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &KeyName, 0, REG_SZ, @@ -474,7 +474,7 @@ CmpCreateControlSet(IN PLOADER_PARAMETER_BLOCK LoaderBlock) OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwOpenKey(&SelectHandle, KEY_READ, &ObjectAttributes); + Status = NtOpenKey(&SelectHandle, KEY_READ, &ObjectAttributes); if (!NT_SUCCESS(Status)) { /* ReactOS Hack: Hard-code current to 001 for SetupLdr */ @@ -488,17 +488,16 @@ CmpCreateControlSet(IN PLOADER_PARAMETER_BLOCK LoaderBlock) OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateKey(&KeyHandle, + Status = NtCreateKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes, 0, NULL, 0, &Disposition); - if (!NT_SUCCESS(Status)) - return Status; + if (!NT_SUCCESS(Status)) return Status; - /* We don't need the handle */ + /* Don't need the handle */ ZwClose(KeyHandle); /* Use hard-coded setting */ @@ -534,7 +533,7 @@ UseSet: OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateKey(&KeyHandle, + Status = NtCreateKey(&KeyHandle, KEY_CREATE_LINK, &ObjectAttributes, 0, @@ -558,7 +557,7 @@ UseSet: Status = RtlAnsiStringToUnicodeString(&KeyName, &TempString, FALSE); /* Set the value */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &CmSymbolicLinkValueName, 0, REG_LINK, @@ -573,7 +572,7 @@ UseSet: KeyHandle, NULL); Status = NtOpenKey(&ConfigHandle, KEY_READ, &ObjectAttributes); - ZwClose(KeyHandle); + NtClose(KeyHandle); /* Check if we don't have one */ if (!NT_SUCCESS(Status)) @@ -690,7 +689,7 @@ UseSet: ASSERT(STATUS_SUCCESS == Status); /* Set it */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &CmSymbolicLinkValueName, 0, REG_LINK, @@ -2181,7 +2180,7 @@ CmpSetVersionData(VOID) RtlInitUnicodeString(&ValueData, Buffer); - ZwSetValueKey(CurrentVersionKeyHandle, + NtSetValueKey(CurrentVersionKeyHandle, &ValueName, 0, REG_SZ, diff --git a/reactos/ntoskrnl/config/i386/cmhardwr.c b/reactos/ntoskrnl/config/i386/cmhardwr.c index 1da455763af..cb8d7e8938d 100644 --- a/reactos/ntoskrnl/config/i386/cmhardwr.c +++ b/reactos/ntoskrnl/config/i386/cmhardwr.c @@ -268,7 +268,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Set the value */ RtlInitUnicodeString(&ValueName, L"PhysicalAddressExtension"); - ZwSetValueKey(KeyHandle, + NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -463,7 +463,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"ProcessorNameString"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -486,7 +486,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"VendorIdentifier"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -502,7 +502,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc { /* Add them to the registry */ RtlInitUnicodeString(&ValueName, L"FeatureSet"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -515,7 +515,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"~MHz"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -528,7 +528,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"Update Signature"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_BINARY, @@ -621,7 +621,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -643,7 +643,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc if (NT_SUCCESS(Status)) { /* Save it to the registry */ - Status = ZwSetValueKey(BiosHandle, + Status = NtSetValueKey(BiosHandle, &ValueName, 0, REG_SZ, @@ -703,7 +703,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, @@ -746,7 +746,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -801,7 +801,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, diff --git a/reactos/ntoskrnl/config/powerpc/cmhardwr.c b/reactos/ntoskrnl/config/powerpc/cmhardwr.c index 84b7d912630..f034f537433 100644 --- a/reactos/ntoskrnl/config/powerpc/cmhardwr.c +++ b/reactos/ntoskrnl/config/powerpc/cmhardwr.c @@ -267,7 +267,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Set the value */ RtlInitUnicodeString(&ValueName, L"PhysicalAddressExtension"); - ZwSetValueKey(KeyHandle, + NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -465,7 +465,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"ProcessorNameString"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -488,7 +488,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"VendorIdentifier"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -504,7 +504,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc { /* Add them to the registry */ RtlInitUnicodeString(&ValueName, L"FeatureSet"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -517,7 +517,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"~MHz"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -530,7 +530,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"Update Signature"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_BINARY, @@ -623,7 +623,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -645,7 +645,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc if (NT_SUCCESS(Status)) { /* Save it to the registry */ - Status = ZwSetValueKey(BiosHandle, + Status = NtSetValueKey(BiosHandle, &ValueName, 0, REG_SZ, @@ -705,7 +705,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, @@ -749,7 +749,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -804,7 +804,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 519f8400bf1..04f8e785d10 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -1853,7 +1853,7 @@ Phase1InitializationDiscard(IN PVOID Context) { /* Write the safe boot type */ RtlInitUnicodeString(&KeyName, L"OptionValue"); - ZwSetValueKey(OptionHandle, + NtSetValueKey(OptionHandle, &KeyName, 0, REG_DWORD, @@ -1866,7 +1866,7 @@ Phase1InitializationDiscard(IN PVOID Context) /* Remember this for later */ Disposition = TRUE; RtlInitUnicodeString(&KeyName, L"UseAlternateShell"); - ZwSetValueKey(OptionHandle, + NtSetValueKey(OptionHandle, &KeyName, 0, REG_DWORD, diff --git a/reactos/ntoskrnl/io/iomgr/bootlog.c b/reactos/ntoskrnl/io/iomgr/bootlog.c index 8fb20b81c5d..bb2d8adfbd1 100644 --- a/reactos/ntoskrnl/io/iomgr/bootlog.c +++ b/reactos/ntoskrnl/io/iomgr/bootlog.c @@ -135,7 +135,7 @@ IopBootLog(PUNICODE_STRING DriverName, if (!NT_SUCCESS(Status)) { - DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); + DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); } else { -- 2.17.1