Author: sginsberg Date: Sun Aug 24 13:47:14 2008 New Revision: 35608
URL: http://svn.reactos.org/svn/reactos?rev=35608&view=rev Log: - [FORMATTING] Code style and comment cleanup. No code change.
Modified: trunk/reactos/ntoskrnl/io/iomgr/drvrlist.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/drvrlist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/drvrlist.... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/drvrlist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/drvrlist.c [iso-8859-1] Sun Aug 24 13:47:14 2008 @@ -350,39 +350,44 @@ NTSTATUS INIT_FUNCTION IoDestroyDriverList(VOID) { - PSERVICE_GROUP CurrentGroup, tmp1; - PSERVICE CurrentService, tmp2; - - DPRINT("IoDestroyDriverList() called\n"); - - /* Destroy group list */ - LIST_FOR_EACH_SAFE(CurrentGroup, tmp1, &GroupListHead, SERVICE_GROUP, GroupListEntry) - { - ExFreePool(CurrentGroup->GroupName.Buffer); - RemoveEntryList(&CurrentGroup->GroupListEntry); - if (CurrentGroup->TagArray) - { - ExFreePool(CurrentGroup->TagArray); - } - ExFreePool(CurrentGroup); - } - - /* Destroy service list */ - LIST_FOR_EACH_SAFE(CurrentService, tmp2, &ServiceListHead, SERVICE, ServiceListEntry) - { - ExFreePool(CurrentService->ServiceName.Buffer); - ExFreePool(CurrentService->RegistryPath.Buffer); - if (CurrentService->ServiceGroup.Buffer) - ExFreePool(CurrentService->ServiceGroup.Buffer); - if (CurrentService->ImagePath.Buffer) - ExFreePool(CurrentService->ImagePath.Buffer); - RemoveEntryList(&CurrentService->ServiceListEntry); - ExFreePool(CurrentService); - } - - DPRINT("IoDestroyDriverList() done\n"); - - return(STATUS_SUCCESS); + PSERVICE_GROUP CurrentGroup, tmp1; + PSERVICE CurrentService, tmp2; + + DPRINT("IoDestroyDriverList() called\n"); + + /* Destroy the Group List */ + LIST_FOR_EACH_SAFE(CurrentGroup, tmp1, &GroupListHead, SERVICE_GROUP, GroupListEntry) + { + /* Remove it from the list */ + RemoveEntryList(&CurrentGroup->GroupListEntry); + + /* Free buffers */ + ExFreePool(CurrentGroup->GroupName.Buffer); + if (CurrentGroup->TagArray) + ExFreePool(CurrentGroup->TagArray); + ExFreePool(CurrentGroup); + } + + /* Destroy the Service List */ + 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->RegistryPath.Buffer); + if (CurrentService->ServiceGroup.Buffer) + ExFreePool(CurrentService->ServiceGroup.Buffer); + if (CurrentService->ImagePath.Buffer) + ExFreePool(CurrentService->ImagePath.Buffer); + ExFreePool(CurrentService); + } + + DPRINT("IoDestroyDriverList() done\n"); + + /* Return success */ + return STATUS_SUCCESS; }
static INIT_FUNCTION NTSTATUS @@ -435,8 +440,8 @@ * Return Value * None */ - -VOID FASTCALL +VOID +FASTCALL IopInitializeSystemDrivers(VOID) { PSERVICE_GROUP CurrentGroup; @@ -446,50 +451,55 @@
DPRINT("IopInitializeSystemDrivers()\n");
- LIST_FOR_EACH(CurrentGroup, &GroupListHead, SERVICE_GROUP, GroupListEntry) - { - DPRINT("Group: %wZ\n", &CurrentGroup->GroupName); - - /* Load all drivers with a valid tag */ - for (i = 0; i < CurrentGroup->TagCount; i++) - { - LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) - { - if ((RtlCompareUnicodeString(&CurrentGroup->GroupName, - &CurrentService->ServiceGroup, TRUE) == 0) && - (CurrentService->Start == 1 /*SERVICE_SYSTEM_START*/) && - (CurrentService->Tag == CurrentGroup->TagArray[i])) - { - DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); - Status = IopLoadDriver(CurrentService); - } - } - } - - /* Load all drivers without a tag or with an invalid tag */ - LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) - { - if ((RtlCompareUnicodeString(&CurrentGroup->GroupName, - &CurrentService->ServiceGroup, TRUE) == 0) && - (CurrentService->Start == 1 /*SERVICE_SYSTEM_START*/)) - { - for (i = 0; i < CurrentGroup->TagCount; i++) - { - if (CurrentGroup->TagArray[i] == CurrentService->Tag) - { - break; - } - } - if (i >= CurrentGroup->TagCount) - { - DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); - Status = IopLoadDriver(CurrentService); - } - } - } - - } - - DPRINT("IopInitializeSystemDrivers() done\n"); -} -/* EOF */ + /* Loop the list */ + LIST_FOR_EACH(CurrentGroup, &GroupListHead, SERVICE_GROUP, GroupListEntry) + { + + DPRINT("Group: %wZ\n", &CurrentGroup->GroupName); + + /* Load all drivers with a valid tag */ + for (i = 0; i < CurrentGroup->TagCount; i++) + { + /* Loop the list */ + LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) + { + if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName, + &CurrentService->ServiceGroup, + TRUE)) && + (CurrentService->Start == SERVICE_SYSTEM_START) && + (CurrentService->Tag == CurrentGroup->TagArray[i])) + + { + DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); + Status = IopLoadDriver(CurrentService); + } + } + } + + /* Load all drivers without a tag or with an invalid tag */ + LIST_FOR_EACH(CurrentService, &ServiceListHead, SERVICE, ServiceListEntry) + { + if ((!RtlCompareUnicodeString(&CurrentGroup->GroupName, + &CurrentService->ServiceGroup, + TRUE)) && + (CurrentService->Start == SERVICE_SYSTEM_START)) + { + for (i = 0; i < CurrentGroup->TagCount; i++) + { + if (CurrentGroup->TagArray[i] == CurrentService->Tag) + { + break; + } + } + + if (i >= CurrentGroup->TagCount) + { + DPRINT(" Path: %wZ\n", &CurrentService->RegistryPath); + Status = IopLoadDriver(CurrentService); + } + } + } + } + + DPRINT("IopInitializeSystemDrivers() done\n"); +}