From 4556d3a778973a650a933a64bfbb1f4e5e9bc446 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 26 Jan 2005 13:48:38 +0000 Subject: [PATCH] - Replace NtQuerySystemTime by KeQuerySystemTime - Nt->Zw svn path=/trunk/; revision=13307 --- reactos/ntoskrnl/cm/import.c | 16 ++++++++-------- reactos/ntoskrnl/cm/ntfunc.c | 23 +++++++++++------------ reactos/ntoskrnl/cm/regfile.c | 20 ++++++++++---------- reactos/ntoskrnl/cm/regobj.c | 2 +- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/reactos/ntoskrnl/cm/import.c b/reactos/ntoskrnl/cm/import.c index 4afca0be886..6523c58e65c 100644 --- a/reactos/ntoskrnl/cm/import.c +++ b/reactos/ntoskrnl/cm/import.c @@ -233,7 +233,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -245,7 +245,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); /* Create '\Registry\Machine\HARDWARE\DESCRIPTION' key. */ RtlInitUnicodeString(&KeyName, @@ -255,7 +255,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -267,7 +267,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); /* Create '\Registry\Machine\HARDWARE\DEVICEMAP' key. */ RtlInitUnicodeString (&KeyName, @@ -277,7 +277,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -289,7 +289,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); /* Create '\Registry\Machine\HARDWARE\RESOURCEMAP' key. */ RtlInitUnicodeString(&KeyName, @@ -299,7 +299,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -311,7 +311,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); return TRUE; } diff --git a/reactos/ntoskrnl/cm/ntfunc.c b/reactos/ntoskrnl/cm/ntfunc.c index 0e654eea8b5..fe789811ccf 100644 --- a/reactos/ntoskrnl/cm/ntfunc.c +++ b/reactos/ntoskrnl/cm/ntfunc.c @@ -30,23 +30,22 @@ static BOOLEAN CmiRegistryInitialized = FALSE; */ NTSTATUS STDCALL CmRegisterCallback(IN PEX_CALLBACK_FUNCTION Function, - IN PVOID Context, - IN OUT PLARGE_INTEGER Cookie - ) + IN PVOID Context, + IN OUT PLARGE_INTEGER Cookie) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } + /* * @unimplemented */ - NTSTATUS STDCALL -CmUnRegisterCallback(IN LARGE_INTEGER Cookie) +CmUnRegisterCallback(IN LARGE_INTEGER Cookie) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } @@ -1640,7 +1639,7 @@ NtSetValueKey(IN HANDLE KeyHandle, KeyCell->Flags |= REG_KEY_LINK_CELL; } - ZwQuerySystemTime (&KeyCell->LastWriteTime); + KeQuerySystemTime (&KeyCell->LastWriteTime); CmiMarkBlockDirty (RegistryHive, KeyObject->KeyCellOffset); ExReleaseResourceLite(&CmiRegistryLock); @@ -1685,7 +1684,7 @@ NtDeleteValueKey (IN HANDLE KeyHandle, KeyObject->KeyCellOffset, ValueName); - ZwQuerySystemTime (&KeyObject->KeyCell->LastWriteTime); + KeQuerySystemTime (&KeyObject->KeyCell->LastWriteTime); CmiMarkBlockDirty (KeyObject->RegistryHive, KeyObject->KeyCellOffset); /* Release hive lock */ @@ -1749,7 +1748,7 @@ NtLoadKey2 (IN POBJECT_ATTRIBUTES KeyObjectAttributes, if (Buffer == NULL) return STATUS_INSUFFICIENT_RESOURCES; - Status = NtQueryObject (FileObjectAttributes->RootDirectory, + Status = ZwQueryObject (FileObjectAttributes->RootDirectory, ObjectNameInformation, Buffer, BufferSize, diff --git a/reactos/ntoskrnl/cm/regfile.c b/reactos/ntoskrnl/cm/regfile.c index 30bab35448f..42cb0fbad7d 100644 --- a/reactos/ntoskrnl/cm/regfile.c +++ b/reactos/ntoskrnl/cm/regfile.c @@ -71,7 +71,7 @@ CmiCreateDefaultRootKeyCell(PKEY_CELL RootKeyCell) RootKeyCell->CellSize = -sizeof(KEY_CELL); RootKeyCell->Id = REG_KEY_CELL_ID; RootKeyCell->Flags = REG_KEY_ROOT_CELL | REG_KEY_NAME_PACKED; - ZwQuerySystemTime(&RootKeyCell->LastWriteTime); + KeQuerySystemTime(&RootKeyCell->LastWriteTime); RootKeyCell->ParentKeyOffset = 0; RootKeyCell->NumberOfSubKeys = 0; RootKeyCell->HashTableOffset = -1; @@ -1939,7 +1939,7 @@ CmiFlushRegistryHive(PREGISTRY_HIVE RegistryHive) &RegistryHive->LogFileName); /* Update hive header modification time */ - ZwQuerySystemTime(&RegistryHive->HiveHeader->DateModified); + KeQuerySystemTime(&RegistryHive->HiveHeader->DateModified); /* Start log update */ Status = CmiStartLogUpdate(RegistryHive); @@ -2436,7 +2436,7 @@ CmiAddSubKey(PREGISTRY_HIVE RegistryHive, { NewKeyCell->Id = REG_KEY_CELL_ID; NewKeyCell->Flags = 0; - ZwQuerySystemTime(&NewKeyCell->LastWriteTime); + KeQuerySystemTime(&NewKeyCell->LastWriteTime); NewKeyCell->ParentKeyOffset = -1; NewKeyCell->NumberOfSubKeys = 0; NewKeyCell->HashTableOffset = -1; @@ -2552,7 +2552,7 @@ CmiAddSubKey(PREGISTRY_HIVE RegistryHive, ParentKeyCell->NumberOfSubKeys++; } - ZwQuerySystemTime (&ParentKeyCell->LastWriteTime); + KeQuerySystemTime (&ParentKeyCell->LastWriteTime); CmiMarkBlockDirty (RegistryHive, ParentKey->KeyCellOffset); return(Status); @@ -2710,7 +2710,7 @@ CmiRemoveSubKey(PREGISTRY_HIVE RegistryHive, } } - ZwQuerySystemTime(&ParentKey->KeyCell->LastWriteTime); + KeQuerySystemTime(&ParentKey->KeyCell->LastWriteTime); CmiMarkBlockDirty(ParentKey->RegistryHive, ParentKey->KeyCellOffset); } @@ -3210,7 +3210,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive)) - ZwQuerySystemTime(&Bin->DateModified); + KeQuerySystemTime(&Bin->DateModified); } /* Destroy the value cell */ @@ -3219,7 +3219,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive) && CmiGetCell (RegistryHive, ValueCellOffset, &Bin)) { - ZwQuerySystemTime(&Bin->DateModified); + KeQuerySystemTime(&Bin->DateModified); } return Status; @@ -3254,7 +3254,7 @@ CmiAddBin(PREGISTRY_HIVE RegistryHive, RegistryHive->FileSize += BinSize; tmpBin->BinSize = BinSize; tmpBin->Unused1 = 0; - ZwQuerySystemTime(&tmpBin->DateModified); + KeQuerySystemTime(&tmpBin->DateModified); tmpBin->Unused2 = 0; DPRINT (" BinOffset %lx BinSize %lx\n", tmpBin->BinOffset,tmpBin->BinSize); @@ -3382,7 +3382,7 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive, return STATUS_UNSUCCESSFUL; } - ZwQuerySystemTime(&Bin->DateModified); + KeQuerySystemTime(&Bin->DateModified); CmiMarkBlockDirty(RegistryHive, RegistryHive->FreeListOffset[i]); if ((i + 1) < RegistryHive->FreeListSize) @@ -3471,7 +3471,7 @@ CmiDestroyCell (PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive) && CmiGetCell (RegistryHive, CellOffset,&pBin)) - ZwQuerySystemTime(&pBin->DateModified); + KeQuerySystemTime(&pBin->DateModified); CmiMarkBlockDirty(RegistryHive, CellOffset); } diff --git a/reactos/ntoskrnl/cm/regobj.c b/reactos/ntoskrnl/cm/regobj.c index f4de497cd6a..f0809a75d10 100644 --- a/reactos/ntoskrnl/cm/regobj.c +++ b/reactos/ntoskrnl/cm/regobj.c @@ -287,7 +287,7 @@ CmiObjectDelete(PVOID DeletedObject) ParentKeyObject, KeyObject); - NtQuerySystemTime (&ParentKeyObject->KeyCell->LastWriteTime); + KeQuerySystemTime (&ParentKeyObject->KeyCell->LastWriteTime); CmiMarkBlockDirty (ParentKeyObject->RegistryHive, ParentKeyObject->KeyCellOffset);