- If a driver has no Tag specified it should be defaulted to the max ULONG value, so it gets loaded after all drivers with correct tags. This fixes a problem of null.sys and beep.sys loading up to TagCount (20 for Base group) times during each boot.

svn path=/trunk/; revision=39815
This commit is contained in:
Aleksey Bragin 2009-02-28 10:29:06 +00:00
parent fde70551ec
commit 09ce3c6e91

View file

@ -152,6 +152,7 @@ IopCreateServiceListEntry(PUNICODE_STRING ServiceName)
RTL_QUERY_REGISTRY_TABLE QueryTable[7];
PSERVICE Service;
NTSTATUS Status;
ULONG DefaultTag = ~0;
DPRINT("ServiceName: '%wZ'\n", ServiceName);
@ -191,6 +192,9 @@ IopCreateServiceListEntry(PUNICODE_STRING ServiceName)
QueryTable[5].Name = L"Tag";
QueryTable[5].Flags = RTL_QUERY_REGISTRY_DIRECT;
QueryTable[5].EntryContext = &Service->Tag;
QueryTable[5].DefaultData = &DefaultTag;
QueryTable[5].DefaultType = REG_DWORD;
QueryTable[5].DefaultLength = sizeof(DefaultTag);
Status = RtlQueryRegistryValues(RTL_REGISTRY_SERVICES,
ServiceName->Buffer,