- [FORMATTING] Code style and comment cleanup. No code change.

svn path=/trunk/; revision=35608
This commit is contained in:
Stefan Ginsberg 2008-08-24 18:47:14 +00:00
parent 0eaca617d3
commit 3250ec8a01

View file

@ -355,34 +355,39 @@ IoDestroyDriverList(VOID)
DPRINT("IoDestroyDriverList() called\n"); DPRINT("IoDestroyDriverList() called\n");
/* Destroy group list */ /* Destroy the Group List */
LIST_FOR_EACH_SAFE(CurrentGroup, tmp1, &GroupListHead, SERVICE_GROUP, GroupListEntry) LIST_FOR_EACH_SAFE(CurrentGroup, tmp1, &GroupListHead, SERVICE_GROUP, GroupListEntry)
{ {
ExFreePool(CurrentGroup->GroupName.Buffer); /* Remove it from the list */
RemoveEntryList(&CurrentGroup->GroupListEntry); RemoveEntryList(&CurrentGroup->GroupListEntry);
/* Free buffers */
ExFreePool(CurrentGroup->GroupName.Buffer);
if (CurrentGroup->TagArray) if (CurrentGroup->TagArray)
{
ExFreePool(CurrentGroup->TagArray); ExFreePool(CurrentGroup->TagArray);
}
ExFreePool(CurrentGroup); ExFreePool(CurrentGroup);
} }
/* Destroy service list */ /* Destroy the Service List */
LIST_FOR_EACH_SAFE(CurrentService, tmp2, &ServiceListHead, SERVICE, ServiceListEntry) LIST_FOR_EACH_SAFE(CurrentService, tmp2, &ServiceListHead, SERVICE, ServiceListEntry)
{ {
/* Remove it from the list */
RemoveEntryList(&CurrentService->ServiceListEntry);
/* Free buffers */
ExFreePool(CurrentService->ServiceName.Buffer); ExFreePool(CurrentService->ServiceName.Buffer);
ExFreePool(CurrentService->RegistryPath.Buffer); ExFreePool(CurrentService->RegistryPath.Buffer);
if (CurrentService->ServiceGroup.Buffer) if (CurrentService->ServiceGroup.Buffer)
ExFreePool(CurrentService->ServiceGroup.Buffer); ExFreePool(CurrentService->ServiceGroup.Buffer);
if (CurrentService->ImagePath.Buffer) if (CurrentService->ImagePath.Buffer)
ExFreePool(CurrentService->ImagePath.Buffer); ExFreePool(CurrentService->ImagePath.Buffer);
RemoveEntryList(&CurrentService->ServiceListEntry);
ExFreePool(CurrentService); ExFreePool(CurrentService);
} }
DPRINT("IoDestroyDriverList() done\n"); DPRINT("IoDestroyDriverList() done\n");
return(STATUS_SUCCESS); /* Return success */
return STATUS_SUCCESS;
} }
static INIT_FUNCTION NTSTATUS static INIT_FUNCTION NTSTATUS
@ -435,8 +440,8 @@ IopLoadDriver(PSERVICE Service)
* Return Value * Return Value
* None * None
*/ */
VOID
VOID FASTCALL FASTCALL
IopInitializeSystemDrivers(VOID) IopInitializeSystemDrivers(VOID)
{ {
PSERVICE_GROUP CurrentGroup; PSERVICE_GROUP CurrentGroup;
@ -446,19 +451,24 @@ IopInitializeSystemDrivers(VOID)
DPRINT("IopInitializeSystemDrivers()\n"); DPRINT("IopInitializeSystemDrivers()\n");
/* Loop the list */
LIST_FOR_EACH(CurrentGroup, &GroupListHead, SERVICE_GROUP, GroupListEntry) LIST_FOR_EACH(CurrentGroup, &GroupListHead, SERVICE_GROUP, GroupListEntry)
{ {
DPRINT("Group: %wZ\n", &CurrentGroup->GroupName); DPRINT("Group: %wZ\n", &CurrentGroup->GroupName);
/* Load all drivers with a valid tag */ /* Load all drivers with a valid tag */
for (i = 0; i < CurrentGroup->TagCount; i++) for (i = 0; i < CurrentGroup->TagCount; i++)
{ {
/* Loop the list */
LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry)
{ {
if ((RtlCompareUnicodeString(&CurrentGroup->GroupName, if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName,
&CurrentService->ServiceGroup, TRUE) == 0) && &CurrentService->ServiceGroup,
(CurrentService->Start == 1 /*SERVICE_SYSTEM_START*/) && TRUE)) &&
(CurrentService->Start == SERVICE_SYSTEM_START) &&
(CurrentService->Tag == CurrentGroup->TagArray[i])) (CurrentService->Tag == CurrentGroup->TagArray[i]))
{ {
DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath);
Status = IopLoadDriver(CurrentService); Status = IopLoadDriver(CurrentService);
@ -469,9 +479,10 @@ IopInitializeSystemDrivers(VOID)
/* Load all drivers without a tag or with an invalid tag */ /* Load all drivers without a tag or with an invalid tag */
LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry)
{ {
if ((RtlCompareUnicodeString(&CurrentGroup->GroupName, if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName,
&CurrentService->ServiceGroup, TRUE) == 0) && &CurrentService->ServiceGroup,
(CurrentService->Start == 1 /*SERVICE_SYSTEM_START*/)) TRUE)) &&
(CurrentService->Start == SERVICE_SYSTEM_START))
{ {
for (i = 0; i < CurrentGroup->TagCount; i++) for (i = 0; i < CurrentGroup->TagCount; i++)
{ {
@ -480,6 +491,7 @@ IopInitializeSystemDrivers(VOID)
break; break;
} }
} }
if (i >= CurrentGroup->TagCount) if (i >= CurrentGroup->TagCount)
{ {
DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath);
@ -487,9 +499,7 @@ IopInitializeSystemDrivers(VOID)
} }
} }
} }
} }
DPRINT("IopInitializeSystemDrivers() done\n"); DPRINT("IopInitializeSystemDrivers() done\n");
} }
/* EOF */