Skip to content

Commit f8b5a02

Browse files
Revert "[NTOS:CONFIG] Minor formatting + add a comment about ArcSystem component type normalization."
This reverts commit f4cd3f0.
1 parent eb85b86 commit f8b5a02

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

ntoskrnl/config/cmconfig.c

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,8 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
3737
/* Get the component */
3838
Component = &CurrentEntry->ComponentEntry;
3939

40-
/*
41-
* Normalize system class components to ARC system type.
42-
* The NT OS loader already sets the component type to
43-
* ArcSystem for ARC-compatible systems, but sets it to
44-
* MaximumType for non-ARC-compatible ones.
45-
*/
46-
if (Component->Class == SystemClass)
47-
Component->Type = ArcSystem;
40+
/* Set system class components to ARC system type */
41+
if (Component->Class == SystemClass) Component->Type = ArcSystem;
4842

4943
/* Create a key for the component */
5044
InitializeObjectAttributes(&ObjectAttributes,
@@ -59,16 +53,15 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
5953
NULL,
6054
0,
6155
&Disposition);
62-
if (!NT_SUCCESS(Status))
63-
return Status;
56+
if (!NT_SUCCESS(Status)) return Status;
6457

6558
/* Check if this is anything but a system class component */
6659
if (Component->Class != SystemClass)
6760
{
6861
/* Build the sub-component string */
6962
RtlIntegerToChar(DeviceIndexTable[Component->Type]++,
7063
10,
71-
_countof(TempBuffer),
64+
12,
7265
TempBuffer);
7366
RtlInitAnsiString(&TempString, TempBuffer);
7467

@@ -235,7 +228,7 @@ CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
235228
/* EISA */
236229
case EisaAdapter:
237230
{
238-
/* Adjust information */
231+
/* Fixup information */
239232
Interface = Eisa;
240233
Bus = CmpTypeCount[EisaAdapter]++;
241234
break;
@@ -244,13 +237,13 @@ CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
244237
/* Turbo-channel */
245238
case TcAdapter:
246239
{
247-
/* Adjust information */
240+
/* Fixup information */
248241
Interface = TurboChannel;
249242
Bus = CmpTypeCount[TurboChannel]++;
250243
break;
251244
}
252245

253-
/* ISA, PCI, etc buses */
246+
/* ISA, PCI, etc busses */
254247
case MultiFunctionAdapter:
255248
{
256249
/* Check if we have an identifier */
@@ -268,7 +261,7 @@ CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
268261
}
269262
}
270263

271-
/* Adjust information */
264+
/* Fix up information */
272265
Interface = CmpMultifunctionTypes[i].InterfaceType;
273266
Bus = CmpMultifunctionTypes[i].Count++;
274267
}
@@ -278,7 +271,7 @@ CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
278271
/* SCSI Bus */
279272
case ScsiAdapter:
280273
{
281-
/* Adjust information */
274+
/* Fix up */
282275
Interface = Internal;
283276
Bus = CmpTypeCount[ScsiAdapter]++;
284277
break;
@@ -303,8 +296,7 @@ CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
303296
Interface,
304297
Bus,
305298
DeviceIndexTable);
306-
if (!NT_SUCCESS(Status))
307-
return Status;
299+
if (!NT_SUCCESS(Status)) return Status;
308300

309301
/* Check for children */
310302
if (CurrentEntry->Child)
@@ -368,7 +360,7 @@ CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
368360
return Status;
369361
NtClose(KeyHandle);
370362

371-
/* Nobody should have created this key yet! */
363+
/* Nobody should've created this key yet! */
372364
ASSERT(Disposition == REG_CREATED_NEW_KEY);
373365

374366
/* Setup the key name */
@@ -391,7 +383,7 @@ CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
391383
if (!NT_SUCCESS(Status))
392384
return Status;
393385

394-
/* Nobody should have created this key yet! */
386+
/* Nobody should've created this key yet! */
395387
ASSERT(Disposition == REG_CREATED_NEW_KEY);
396388

397389
/* Allocate the configuration data buffer */

0 commit comments

Comments
 (0)