From 2ebd2df13f95db21d3109a7765f3cc01520c0b2f Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 11 Dec 2007 15:32:24 +0000 Subject: [PATCH] - Don't build the HARDWARE hive in FreeLDR anymore. svn path=/trunk/; revision=31145 --- .../boot/freeldr/freeldr/reactos/archwsup.c | 70 +------------------ .../boot/freeldr/freeldr/reactos/registry.c | 15 ---- 2 files changed, 2 insertions(+), 83 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/reactos/archwsup.c b/reactos/boot/freeldr/freeldr/reactos/archwsup.c index 95ddb389ee9..f59e0be27bc 100644 --- a/reactos/boot/freeldr/freeldr/reactos/archwsup.c +++ b/reactos/boot/freeldr/freeldr/reactos/archwsup.c @@ -47,27 +47,14 @@ FldrSetComponentInformation(IN PCONFIGURATION_COMPONENT_DATA ComponentData, IN ULONG Key, IN ULONG Affinity) { - LONG Error; PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry; /* Set component information */ Component->Flags = Flags; Component->Version = 0; Component->Revision = 0; - //Component->Key = Key; // HACK: We store the registry key here + Component->Key = Key; Component->AffinityMask = Affinity; - - /* Set the value */ - Error = RegSetValue((FRLDRHKEY)Component->Key, - L"Component Information", - REG_BINARY, - (PVOID)&Component->Flags, - FIELD_OFFSET(CONFIGURATION_COMPONENT, ConfigurationDataLength) - - FIELD_OFFSET(CONFIGURATION_COMPONENT, Flags)); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", Error)); - } } VOID @@ -75,7 +62,6 @@ NTAPI FldrSetIdentifier(IN PCONFIGURATION_COMPONENT_DATA ComponentData, IN PWCHAR IdentifierString) { - LONG Error; ULONG IdentifierLength; PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry; PCHAR Identifier; @@ -92,25 +78,12 @@ FldrSetIdentifier(IN PCONFIGURATION_COMPONENT_DATA ComponentData, /* Set component information */ Component->IdentifierLength = IdentifierLength; Component->Identifier = Identifier; - - /* Set the key */ - Error = RegSetValue((FRLDRHKEY)Component->Key, - L"Identifier", - REG_SZ, - (PCHAR)IdentifierString, - IdentifierLength); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", Error)); - return; - } } VOID NTAPI FldrCreateSystemKey(OUT PCONFIGURATION_COMPONENT_DATA *SystemNode) { - LONG Error; PCONFIGURATION_COMPONENT Component; /* Allocate the root */ @@ -127,16 +100,6 @@ FldrCreateSystemKey(OUT PCONFIGURATION_COMPONENT_DATA *SystemNode) /* Return the node */ *SystemNode = FldrArcHwTreeRoot; - - /* Create the key */ - Error = RegCreateKey(NULL, - L"\\Registry\\Machine\\HARDWARE\\DESCRIPTION\\System", - (FRLDRHKEY*)&Component->Key); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", Error)); - return; - } } VOID @@ -178,8 +141,6 @@ FldrCreateComponentKey(IN PCONFIGURATION_COMPONENT_DATA SystemNode, IN CONFIGURATION_TYPE Type, OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey) { - LONG Error; - WCHAR Buffer[80]; PCONFIGURATION_COMPONENT_DATA ComponentData; PCONFIGURATION_COMPONENT Component; @@ -199,20 +160,7 @@ FldrCreateComponentKey(IN PCONFIGURATION_COMPONENT_DATA SystemNode, Component->Type = Type; /* Return the child */ - *ComponentKey = ComponentData; - - /* Build the key name */ - swprintf(Buffer, L"%s\\%u", BusName, BusNumber); - - /* Create the key */ - Error = RegCreateKey((FRLDRHKEY)SystemNode->ComponentEntry.Key, - Buffer, - (FRLDRHKEY*)&Component->Key); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", Error)); - return; - } + *ComponentKey = ComponentData; } VOID @@ -221,7 +169,6 @@ FldrSetConfigurationData(IN PCONFIGURATION_COMPONENT_DATA ComponentData, IN PCM_FULL_RESOURCE_DESCRIPTOR Data, IN ULONG Size) { - LONG Error; PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry; PVOID ConfigurationData; @@ -237,17 +184,4 @@ FldrSetConfigurationData(IN PCONFIGURATION_COMPONENT_DATA ComponentData, Component->ConfigurationDataLength = Size - FIELD_OFFSET(CM_FULL_RESOURCE_DESCRIPTOR, PartialResourceList); - - /* Set 'Configuration Data' value */ - Error = RegSetValue((FRLDRHKEY)Component->Key, - L"Configuration Data", - REG_FULL_RESOURCE_DESCRIPTOR, - (PVOID)Data, - Size); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, - "RegSetValue(Configuration Data) failed (Error %u)\n", - Error)); - } } diff --git a/reactos/boot/freeldr/freeldr/reactos/registry.c b/reactos/boot/freeldr/freeldr/reactos/registry.c index f5062b6e62b..0e111897331 100644 --- a/reactos/boot/freeldr/freeldr/reactos/registry.c +++ b/reactos/boot/freeldr/freeldr/reactos/registry.c @@ -54,21 +54,6 @@ RegInitializeRegistry (VOID) RegCreateKey (RootKey, L"Registry\\Machine\\HARDWARE", NULL); - - /* Create 'HARDWARE\DESCRIPTION' key */ - RegCreateKey (RootKey, - L"Registry\\Machine\\HARDWARE\\DESCRIPTION", - NULL); - - /* Create 'HARDWARE\DEVICEMAP' key */ - RegCreateKey (RootKey, - L"Registry\\Machine\\HARDWARE\\DEVICEMAP", - NULL); - - /* Create 'HARDWARE\RESOURCEMAP' key */ - RegCreateKey (RootKey, - L"Registry\\Machine\\HARDWARE\\RESOURCEMAP", - NULL); }