[NTOSKRNL]

* Fix several print specifiers.
* Add some missing variables to debug prints.

svn path=/trunk/; revision=59923
This commit is contained in:
Amine Khaldi 2013-08-31 16:02:13 +00:00
parent 9e15df6c61
commit a1bafaeaaf
63 changed files with 248 additions and 275 deletions

View file

@ -36,7 +36,7 @@
#define SEC_CACHE (0x20000000) #define SEC_CACHE (0x20000000)
#define MiWaitForPageEvent(Process,Address) do { \ #define MiWaitForPageEvent(Process,Address) do { \
DPRINT("MiWaitForPageEvent %p:%Ix #\n", Process, Address); \ DPRINT("MiWaitForPageEvent %p:%p #\n", Process, Address); \
KeWaitForSingleObject(&MmWaitPageEvent, 0, KernelMode, FALSE, NULL); \ KeWaitForSingleObject(&MmWaitPageEvent, 0, KernelMode, FALSE, NULL); \
} while(0) } while(0)

View file

@ -90,7 +90,7 @@ MmWithdrawSectionPage(PMM_SECTION_SEGMENT Segment,
{ {
ULONG_PTR Entry; ULONG_PTR Entry;
DPRINT("MmWithdrawSectionPage(%x,%08x%08x,%x)\n", DPRINT("MmWithdrawSectionPage(%p,%08x%08x,%p)\n",
Segment, Segment,
FileOffset->HighPart, FileOffset->HighPart,
FileOffset->LowPart, FileOffset->LowPart,
@ -133,7 +133,7 @@ MmWithdrawSectionPage(PMM_SECTION_SEGMENT Segment,
} }
else else
{ {
DPRINT1("SWAP ENTRY?! (%x:%08x%08x)\n", DPRINT1("SWAP ENTRY?! (%p:%08x%08x)\n",
Segment, Segment,
FileOffset->HighPart, FileOffset->HighPart,
FileOffset->LowPart); FileOffset->LowPart);
@ -174,7 +174,7 @@ MmFinalizeSectionPageOut(PMM_SECTION_SEGMENT Segment,
/* Bail early if the reference count isn't where we need it */ /* Bail early if the reference count isn't where we need it */
if (MmGetReferenceCountPage(Page) != 1) if (MmGetReferenceCountPage(Page) != 1)
{ {
DPRINT1("Cannot page out locked page %x with ref count %d\n", DPRINT1("Cannot page out locked page %x with ref count %lu\n",
Page, Page,
MmGetReferenceCountPage(Page)); MmGetReferenceCountPage(Page));
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
@ -185,8 +185,8 @@ MmFinalizeSectionPageOut(PMM_SECTION_SEGMENT Segment,
if (Dirty) if (Dirty)
{ {
DPRINT("Finalize (dirty) Segment %x Page %x\n", Segment, Page); DPRINT("Finalize (dirty) Segment %p Page %x\n", Segment, Page);
DPRINT("Segment->FileObject %x\n", Segment->FileObject); DPRINT("Segment->FileObject %p\n", Segment->FileObject);
DPRINT("Segment->Flags %x\n", Segment->Flags); DPRINT("Segment->Flags %x\n", Segment->Flags);
WriteZero = TRUE; WriteZero = TRUE;
@ -203,7 +203,7 @@ MmFinalizeSectionPageOut(PMM_SECTION_SEGMENT Segment,
if (WritePage) if (WritePage)
{ {
DPRINT("MiWriteBackPage(Segment %x FileObject %x Offset %x)\n", DPRINT("MiWriteBackPage(Segment %p FileObject %p Offset %x)\n",
Segment, Segment,
Segment->FileObject, Segment->FileObject,
FileOffset->LowPart); FileOffset->LowPart);
@ -218,7 +218,7 @@ MmFinalizeSectionPageOut(PMM_SECTION_SEGMENT Segment,
if (WriteZero && NT_SUCCESS(Status)) if (WriteZero && NT_SUCCESS(Status))
{ {
DPRINT("Setting page entry in segment %x:%x to swap %x\n", DPRINT("Setting page entry in segment %p:%x to swap %x\n",
Segment, Segment,
FileOffset->LowPart, FileOffset->LowPart,
Swap); Swap);
@ -229,7 +229,7 @@ MmFinalizeSectionPageOut(PMM_SECTION_SEGMENT Segment,
} }
else else
{ {
DPRINT("Setting page entry in segment %x:%x to page %x\n", DPRINT("Setting page entry in segment %p:%x to page %x\n",
Segment, Segment,
FileOffset->LowPart, FileOffset->LowPart,
Page); Page);
@ -361,7 +361,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
ExAcquireFastMutex(&MiGlobalPageOperation); ExAcquireFastMutex(&MiGlobalPageOperation);
if ((Segment = MmGetSectionAssociation(Page, &FileOffset))) if ((Segment = MmGetSectionAssociation(Page, &FileOffset)))
{ {
DPRINTC("Withdrawing page (%x) %x:%x\n", DPRINTC("Withdrawing page (%x) %p:%x\n",
Page, Page,
Segment, Segment,
FileOffset.LowPart); FileOffset.LowPart);
@ -407,7 +407,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
Process = entry->Process; Process = entry->Process;
Address = entry->Address; Address = entry->Address;
DPRINTC("Process %x Address %x Page %x\n", Process, Address, Page); DPRINTC("Process %p Address %p Page %x\n", Process, Address, Page);
if (RMAP_IS_SEGMENT(Address)) if (RMAP_IS_SEGMENT(Address))
{ {
@ -454,7 +454,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
goto bail; goto bail;
} }
DPRINTC("Type %x (%x -> %x)\n", DPRINTC("Type %x (%p -> %p)\n",
MemoryArea->Type, MemoryArea->Type,
MemoryArea->StartingAddress, MemoryArea->StartingAddress,
MemoryArea->EndingAddress); MemoryArea->EndingAddress);
@ -464,7 +464,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
ASSERT(KeGetCurrentIrql() <= APC_LEVEL); ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
DPRINT("%x:%x, page %x %x\n", DPRINT("%p:%p, page %x %x\n",
Process, Process,
Address, Address,
Page, Page,
@ -494,7 +494,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
} }
else if (Status == STATUS_MORE_PROCESSING_REQUIRED) else if (Status == STATUS_MORE_PROCESSING_REQUIRED)
{ {
DPRINTC("DoAcquisition %x\n", Resources.DoAcquisition); DPRINTC("DoAcquisition %p\n", Resources.DoAcquisition);
Status = Resources.DoAcquisition(AddressSpace, Status = Resources.DoAcquisition(AddressSpace,
MemoryArea, MemoryArea,
@ -524,7 +524,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
ASSERT(!MM_IS_WAIT_PTE(MmGetPfnForProcess(Process, Address))); ASSERT(!MM_IS_WAIT_PTE(MmGetPfnForProcess(Process, Address)));
entry = MmGetRmapListHeadPage(Page); entry = MmGetRmapListHeadPage(Page);
DPRINTC("Entry %x\n", entry); DPRINTC("Entry %p\n", entry);
} }
ExReleaseFastMutex(&RmapListLock); ExReleaseFastMutex(&RmapListLock);
@ -536,7 +536,7 @@ bail:
{ {
ULONG RefCount; ULONG RefCount;
DPRINTC("About to finalize section page %x (%x:%x) Status %x %s\n", DPRINTC("About to finalize section page %x (%p:%x) Status %x %s\n",
Page, Page,
Segment, Segment,
FileOffset.LowPart, FileOffset.LowPart,
@ -638,7 +638,7 @@ MiRosTrimCache(ULONG Target,
PMM_SECTION_SEGMENT Segment; PMM_SECTION_SEGMENT Segment;
*NrFreed = 0; *NrFreed = 0;
DPRINT1("Need to trim %d cache pages\n", Target); DPRINT1("Need to trim %lu cache pages\n", Target);
for (Entry = MiSegmentList.Flink; for (Entry = MiSegmentList.Flink;
*NrFreed < Target && Entry != &MiSegmentList; *NrFreed < Target && Entry != &MiSegmentList;
Entry = Entry->Flink) { Entry = Entry->Flink) {
@ -647,7 +647,7 @@ MiRosTrimCache(ULONG Target,
Freed = MiCacheEvictPages(Segment, Target); Freed = MiCacheEvictPages(Segment, Target);
*NrFreed += Freed; *NrFreed += Freed;
} }
DPRINT1("Evicted %d cache pages\n", Target); DPRINT1("Evicted %lu cache pages\n", Target);
if (!IsListEmpty(&MiSegmentList)) { if (!IsListEmpty(&MiSegmentList)) {
Entry = MiSegmentList.Flink; Entry = MiSegmentList.Flink;

View file

@ -78,7 +78,7 @@ CmpDoFlushNextHive(IN BOOLEAN ForceFlush,
{ {
/* Do the sync */ /* Do the sync */
DPRINT1("Flushing: %wZ\n", CmHive->FileFullPath); DPRINT1("Flushing: %wZ\n", CmHive->FileFullPath);
DPRINT1("Handle: %lx\n", CmHive->FileHandles[HFILE_TYPE_PRIMARY]); DPRINT1("Handle: %p\n", CmHive->FileHandles[HFILE_TYPE_PRIMARY]);
Status = HvSyncHive(&CmHive->Hive); Status = HvSyncHive(&CmHive->Hive);
if(!NT_SUCCESS(Status)) if(!NT_SUCCESS(Status))
{ {

View file

@ -235,7 +235,7 @@ NtEnumerateKey(IN HANDLE KeyHandle,
REG_ENUMERATE_KEY_INFORMATION EnumerateKeyInfo; REG_ENUMERATE_KEY_INFORMATION EnumerateKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo; REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtEnumerateKey() KH 0x%x, Index 0x%x, KIC %d, Length %d\n", DPRINT("NtEnumerateKey() KH 0x%p, Index 0x%x, KIC %d, Length %lu\n",
KeyHandle, Index, KeyInformationClass, Length); KeyHandle, Index, KeyInformationClass, Length);
/* Reject classes we don't know about */ /* Reject classes we don't know about */
@ -319,7 +319,7 @@ NtEnumerateValueKey(IN HANDLE KeyHandle,
REG_ENUMERATE_VALUE_KEY_INFORMATION EnumerateValueKeyInfo; REG_ENUMERATE_VALUE_KEY_INFORMATION EnumerateValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo; REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtEnumerateValueKey() KH 0x%x, Index 0x%x, KVIC %d, Length %d\n", DPRINT("NtEnumerateValueKey() KH 0x%p, Index 0x%x, KVIC %d, Length %lu\n",
KeyHandle, Index, KeyValueInformationClass, Length); KeyHandle, Index, KeyValueInformationClass, Length);
/* Reject classes we don't know about */ /* Reject classes we don't know about */
@ -404,7 +404,7 @@ NtQueryKey(IN HANDLE KeyHandle,
REG_POST_OPERATION_INFORMATION PostOperationInfo; REG_POST_OPERATION_INFORMATION PostOperationInfo;
OBJECT_HANDLE_INFORMATION HandleInfo; OBJECT_HANDLE_INFORMATION HandleInfo;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtQueryKey() KH 0x%x, KIC %d, Length %d\n", DPRINT("NtQueryKey() KH 0x%p, KIC %d, Length %lu\n",
KeyHandle, KeyInformationClass, Length); KeyHandle, KeyInformationClass, Length);
/* Reject invalid classes */ /* Reject invalid classes */
@ -517,7 +517,7 @@ NtQueryValueKey(IN HANDLE KeyHandle,
REG_POST_OPERATION_INFORMATION PostOperationInfo; REG_POST_OPERATION_INFORMATION PostOperationInfo;
UNICODE_STRING ValueNameCopy = *ValueName; UNICODE_STRING ValueNameCopy = *ValueName;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtQueryValueKey() KH 0x%x, VN '%wZ', KVIC %d, Length %d\n", DPRINT("NtQueryValueKey() KH 0x%p, VN '%wZ', KVIC %d, Length %lu\n",
KeyHandle, ValueName, KeyValueInformationClass, Length); KeyHandle, ValueName, KeyValueInformationClass, Length);
/* Verify that the handle is valid and is a registry key */ /* Verify that the handle is valid and is a registry key */
@ -610,7 +610,7 @@ NtSetValueKey(IN HANDLE KeyHandle,
REG_POST_OPERATION_INFORMATION PostOperationInfo; REG_POST_OPERATION_INFORMATION PostOperationInfo;
UNICODE_STRING ValueNameCopy = *ValueName; UNICODE_STRING ValueNameCopy = *ValueName;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtSetValueKey() KH 0x%x, VN '%wZ', TI %x, T %d, DS %d\n", DPRINT("NtSetValueKey() KH 0x%p, VN '%wZ', TI %x, T %lu, DS %lu\n",
KeyHandle, ValueName, TitleIndex, Type, DataSize); KeyHandle, ValueName, TitleIndex, Type, DataSize);
/* Verify that the handle is valid and is a registry key */ /* Verify that the handle is valid and is a registry key */

View file

@ -133,7 +133,7 @@ DbgkpQueueMessage(IN PEPROCESS Process,
if (!DebugObject->DebuggerInactive) if (!DebugObject->DebuggerInactive)
{ {
/* Add the event into the object's list */ /* Add the event into the object's list */
DBGKTRACE(DBGK_MESSAGE_DEBUG, "Inserting: %lx %p\n", DBGKTRACE(DBGK_MESSAGE_DEBUG, "Inserting: %p %d\n",
DebugEvent, Message->ApiNumber); DebugEvent, Message->ApiNumber);
InsertTailList(&DebugObject->EventList, &DebugEvent->EventList); InsertTailList(&DebugObject->EventList, &DebugEvent->EventList);
@ -326,7 +326,7 @@ DbgkForwardException(IN PEXCEPTION_RECORD ExceptionRecord,
BOOLEAN UseLpc = FALSE; BOOLEAN UseLpc = FALSE;
PAGED_CODE(); PAGED_CODE();
DBGKTRACE(DBGK_EXCEPTION_DEBUG, DBGKTRACE(DBGK_EXCEPTION_DEBUG,
"ExceptionRecord: %p Port: %p\n", ExceptionRecord, DebugPort); "ExceptionRecord: %p Port: %u\n", ExceptionRecord, DebugPort);
/* Setup the API Message */ /* Setup the API Message */
ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 | ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
@ -1657,7 +1657,7 @@ NtDebugContinue(IN HANDLE DebugHandle,
BOOLEAN NeedsWake = FALSE; BOOLEAN NeedsWake = FALSE;
CLIENT_ID ClientId; CLIENT_ID ClientId;
PAGED_CODE(); PAGED_CODE();
DBGKTRACE(DBGK_OBJECT_DEBUG, "Handle: %p Status: %p\n", DBGKTRACE(DBGK_OBJECT_DEBUG, "Handle: %p Status: %d\n",
DebugHandle, ContinueStatus); DebugHandle, ContinueStatus);
/* Check if we were called from user mode*/ /* Check if we were called from user mode*/

View file

@ -252,7 +252,7 @@ NtPulseEvent(IN HANDLE EventHandle,
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status; NTSTATUS Status;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtPulseEvent(EventHandle 0%x PreviousState 0%x)\n", DPRINT("NtPulseEvent(EventHandle 0%p PreviousState 0%p)\n",
EventHandle, PreviousState); EventHandle, PreviousState);
/* Check if we were called from user-mode */ /* Check if we were called from user-mode */
@ -393,7 +393,7 @@ NtResetEvent(IN HANDLE EventHandle,
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status; NTSTATUS Status;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtResetEvent(EventHandle 0%x PreviousState 0%x)\n", DPRINT("NtResetEvent(EventHandle 0%p PreviousState 0%p)\n",
EventHandle, PreviousState); EventHandle, PreviousState);
/* Check if we were called from user-mode */ /* Check if we were called from user-mode */
@ -462,7 +462,7 @@ NtSetEvent(IN HANDLE EventHandle,
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status; NTSTATUS Status;
PAGED_CODE(); PAGED_CODE();
DPRINT("NtSetEvent(EventHandle 0%x PreviousState 0%x)\n", DPRINT("NtSetEvent(EventHandle 0%p PreviousState 0%p)\n",
EventHandle, PreviousState); EventHandle, PreviousState);
/* Check if we were called from user-mode */ /* Check if we were called from user-mode */

View file

@ -138,7 +138,7 @@ HeadlessInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
HeadlessGlobals->IsMMIODevice = HeadlessBlock->IsMMIODevice; HeadlessGlobals->IsMMIODevice = HeadlessBlock->IsMMIODevice;
HeadlessGlobals->TerminalType = HeadlessBlock->TerminalType; HeadlessGlobals->TerminalType = HeadlessBlock->TerminalType;
HeadlessGlobals->SystemGUID = HeadlessBlock->SystemGUID; HeadlessGlobals->SystemGUID = HeadlessBlock->SystemGUID;
DPRINT1("EMS on Port %d (0x%lx) at %d bps\n", DPRINT1("EMS on Port %lu (0x%p) at %lu bps\n",
HeadlessGlobals->TerminalPortNumber, HeadlessGlobals->TerminalPortNumber,
HeadlessGlobals->TerminalPortAddress, HeadlessGlobals->TerminalPortAddress,
HeadlessGlobals->TerminalBaudRate); HeadlessGlobals->TerminalBaudRate);

View file

@ -866,7 +866,7 @@ ExBurnMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
PLIST_ENTRY ListEntry; PLIST_ENTRY ListEntry;
PMEMORY_ALLOCATION_DESCRIPTOR MemDescriptor; PMEMORY_ALLOCATION_DESCRIPTOR MemDescriptor;
DPRINT1("Burn RAM amount: %d pages\n", PagesToDestroy); DPRINT1("Burn RAM amount: %lu pages\n", PagesToDestroy);
/* Loop the memory descriptors, beginning at the end */ /* Loop the memory descriptors, beginning at the end */
for (ListEntry = LoaderBlock->MemoryDescriptorListHead.Blink; for (ListEntry = LoaderBlock->MemoryDescriptorListHead.Blink;

View file

@ -656,7 +656,7 @@ ExpWaitForResource(IN PERESOURCE Resource,
ExAcquireResourceLock(Resource, &LockHandle); ExAcquireResourceLock(Resource, &LockHandle);
/* Dump debug information */ /* Dump debug information */
DPRINT1("Resource @ %lx\n", Resource); DPRINT1("Resource @ %p\n", Resource);
DPRINT1(" ActiveEntries = %04lx Flags = %s%s%s\n", DPRINT1(" ActiveEntries = %04lx Flags = %s%s%s\n",
Resource->ActiveEntries, Resource->ActiveEntries,
IsOwnedExclusive(Resource) ? "IsOwnedExclusive " : "", IsOwnedExclusive(Resource) ? "IsOwnedExclusive " : "",

View file

@ -481,7 +481,7 @@ QSI_DEF(SystemProcessorInformation)
Spi->Reserved = 0; Spi->Reserved = 0;
Spi->ProcessorFeatureBits = KeFeatureBits; Spi->ProcessorFeatureBits = KeFeatureBits;
DPRINT("Arch %d Level %d Rev 0x%x\n", Spi->ProcessorArchitecture, DPRINT("Arch %u Level %u Rev 0x%x\n", Spi->ProcessorArchitecture,
Spi->ProcessorLevel, Spi->ProcessorRevision); Spi->ProcessorLevel, Spi->ProcessorRevision);
return STATUS_SUCCESS; return STATUS_SUCCESS;
@ -712,7 +712,7 @@ QSI_DEF(SystemProcessInformation)
!(Process->ActiveThreads) && !(Process->ActiveThreads) &&
(IsListEmpty(&Process->Pcb.ThreadListHead))) (IsListEmpty(&Process->Pcb.ThreadListHead)))
{ {
DPRINT1("Process %p (%s:%lx) is a zombie\n", DPRINT1("Process %p (%s:%p) is a zombie\n",
Process, Process->ImageFileName, Process->UniqueProcessId); Process, Process->ImageFileName, Process->UniqueProcessId);
CurrentSize = 0; CurrentSize = 0;
ImageNameMaximumLength = 0; ImageNameMaximumLength = 0;
@ -1287,7 +1287,7 @@ QSI_DEF(SystemFullMemoryInformation)
TheIdleProcess = PsIdleProcess; TheIdleProcess = PsIdleProcess;
DPRINT("PID: %d, KernelTime: %u PFFree: %d PFUsed: %d\n", DPRINT("PID: %p, KernelTime: %u PFFree: %lu PFUsed: %lu\n",
TheIdleProcess->UniqueProcessId, TheIdleProcess->UniqueProcessId,
TheIdleProcess->Pcb.KernelTime, TheIdleProcess->Pcb.KernelTime,
MiFreeSwapPages, MiFreeSwapPages,

View file

@ -165,7 +165,7 @@ ProcessLoop:
if (Thread->Tcb.SpecialApcDisable) if (Thread->Tcb.SpecialApcDisable)
{ {
/* We're nice and do it behind your back */ /* We're nice and do it behind your back */
DPRINT1("Warning: Broken Worker Thread: %p %lx %p came back " DPRINT1("Warning: Broken Worker Thread: %p %p %p came back "
"with APCs disabled!\n", "with APCs disabled!\n",
WorkItem->WorkerRoutine, WorkItem->WorkerRoutine,
WorkItem->Parameter, WorkItem->Parameter,
@ -348,7 +348,7 @@ ExpDetectWorkerThreadDeadlock(VOID)
(Queue->DynamicThreadCount < 16)) (Queue->DynamicThreadCount < 16))
{ {
/* Stuff is still on the queue and nobody did anything about it */ /* Stuff is still on the queue and nobody did anything about it */
DPRINT1("EX: Work Queue Deadlock detected: %d\n", i); DPRINT1("EX: Work Queue Deadlock detected: %lu\n", i);
ExpCreateWorkerThread(i, TRUE); ExpCreateWorkerThread(i, TRUE);
DPRINT1("Dynamic threads queued %d\n", Queue->DynamicThreadCount); DPRINT1("Dynamic threads queued %d\n", Queue->DynamicThreadCount);
} }
@ -736,7 +736,7 @@ ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem,
(WorkQueue->DynamicThreadCount < 16)) (WorkQueue->DynamicThreadCount < 16))
{ {
/* Let the balance manager know about it */ /* Let the balance manager know about it */
DPRINT1("Requesting a new thread. CurrentCount: %d. MaxCount: %d\n", DPRINT1("Requesting a new thread. CurrentCount: %lu. MaxCount: %lu\n",
WorkQueue->WorkerQueue.CurrentCount, WorkQueue->WorkerQueue.CurrentCount,
WorkQueue->WorkerQueue.MaximumCount); WorkQueue->WorkerQueue.MaximumCount);
KeSetEvent(&ExpThreadSetManagerEvent, 0, FALSE); KeSetEvent(&ExpThreadSetManagerEvent, 0, FALSE);

View file

@ -72,7 +72,7 @@ static PVOID NTAPI LockAllocate(PRTL_GENERIC_TABLE Table, CLONG Bytes)
{ {
PVOID Result; PVOID Result;
Result = ExAllocatePoolWithTag(NonPagedPool, Bytes, TAG_TABLE); Result = ExAllocatePoolWithTag(NonPagedPool, Bytes, TAG_TABLE);
DPRINT("LockAllocate(%d) => %p\n", Bytes, Result); DPRINT("LockAllocate(%lu) => %p\n", Bytes, Result);
return Result; return Result;
} }
@ -347,7 +347,7 @@ FsRtlPrivateLock(IN PFILE_LOCK FileLock,
ULARGE_INTEGER UnsignedStart; ULARGE_INTEGER UnsignedStart;
ULARGE_INTEGER UnsignedEnd; ULARGE_INTEGER UnsignedEnd;
DPRINT("FsRtlPrivateLock(%wZ, Offset %08x%08x (%d), Length %08x%08x (%d), Key %x, FailImmediately %d, Exclusive %d)\n", DPRINT("FsRtlPrivateLock(%wZ, Offset %08x%08x (%d), Length %08x%08x (%d), Key %x, FailImmediately %u, Exclusive %u)\n",
&FileObject->FileName, &FileObject->FileName,
FileOffset->HighPart, FileOffset->HighPart,
FileOffset->LowPart, FileOffset->LowPart,
@ -432,7 +432,7 @@ FsRtlPrivateLock(IN PFILE_LOCK FileLock,
{ {
if (Conflict->Exclusive.FileLock.ExclusiveLock || ExclusiveLock) if (Conflict->Exclusive.FileLock.ExclusiveLock || ExclusiveLock)
{ {
DPRINT("Conflict %08x%08x:%08x%08x Exc %d (Want Exc %d)\n", DPRINT("Conflict %08x%08x:%08x%08x Exc %u (Want Exc %u)\n",
Conflict->Exclusive.FileLock.StartingByte.HighPart, Conflict->Exclusive.FileLock.StartingByte.HighPart,
Conflict->Exclusive.FileLock.StartingByte.LowPart, Conflict->Exclusive.FileLock.StartingByte.LowPart,
Conflict->Exclusive.FileLock.EndingByte.HighPart, Conflict->Exclusive.FileLock.EndingByte.HighPart,
@ -613,7 +613,7 @@ FsRtlPrivateLock(IN PFILE_LOCK FileLock,
} }
else else
{ {
DPRINT("Inserted new lock %wZ %08x%08x %08x%08x exclusive %d\n", DPRINT("Inserted new lock %wZ %08x%08x %08x%08x exclusive %u\n",
&FileObject->FileName, &FileObject->FileName,
Conflict->Exclusive.FileLock.StartingByte.HighPart, Conflict->Exclusive.FileLock.StartingByte.HighPart,
Conflict->Exclusive.FileLock.StartingByte.LowPart, Conflict->Exclusive.FileLock.StartingByte.LowPart,
@ -868,7 +868,7 @@ FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock,
return STATUS_RANGE_NOT_LOCKED; return STATUS_RANGE_NOT_LOCKED;
} }
DPRINT("Found lock entry: Exclusive %d %08x%08x:%08x%08x %wZ\n", DPRINT("Found lock entry: Exclusive %u %08x%08x:%08x%08x %wZ\n",
Entry->Exclusive.FileLock.ExclusiveLock, Entry->Exclusive.FileLock.ExclusiveLock,
Entry->Exclusive.FileLock.StartingByte.HighPart, Entry->Exclusive.FileLock.StartingByte.HighPart,
Entry->Exclusive.FileLock.StartingByte.LowPart, Entry->Exclusive.FileLock.StartingByte.LowPart,

View file

@ -60,7 +60,7 @@ static PVOID NTAPI McbMappingAllocate(PRTL_GENERIC_TABLE Table, CLONG Bytes)
PVOID Result; PVOID Result;
PBASE_MCB Mcb = (PBASE_MCB)Table->TableContext; PBASE_MCB Mcb = (PBASE_MCB)Table->TableContext;
Result = ExAllocatePoolWithTag(Mcb->PoolType, Bytes, 'LMCB'); Result = ExAllocatePoolWithTag(Mcb->PoolType, Bytes, 'LMCB');
DPRINT("McbMappingAllocate(%d) => %p\n", Bytes, Result); DPRINT("McbMappingAllocate(%lu) => %p\n", Bytes, Result);
return Result; return Result;
} }
@ -227,7 +227,7 @@ FsRtlAddBaseMcbEntry(IN PBASE_MCB OpaqueMcb,
/* finally insert the resulting run */ /* finally insert the resulting run */
Existing = RtlInsertElementGenericTable(&Mcb->Mapping->Table, &Node, sizeof(Node), &NewElement); Existing = RtlInsertElementGenericTable(&Mcb->Mapping->Table, &Node, sizeof(Node), &NewElement);
DPRINT("Existing %x, NewElement %d\n", Existing, NewElement); DPRINT("Existing %p, NewElement %u\n", Existing, NewElement);
ASSERT(NewElement); ASSERT(NewElement);
// NB: Two consecutive runs can only be merged, if actual LBNs also match! // NB: Two consecutive runs can only be merged, if actual LBNs also match!
@ -294,7 +294,7 @@ FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb,
{ {
BOOLEAN Result; BOOLEAN Result;
DPRINT("Mcb %x Vbn %lld Lbn %lld SectorCount %lld\n", Mcb, Vbn, Lbn, SectorCount); DPRINT("Mcb %p Vbn %lld Lbn %lld SectorCount %lld\n", Mcb, Vbn, Lbn, SectorCount);
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlAddBaseMcbEntry(&(Mcb->BaseMcb), Result = FsRtlAddBaseMcbEntry(&(Mcb->BaseMcb),
@ -303,7 +303,7 @@ FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb,
SectorCount); SectorCount);
KeReleaseGuardedMutex(Mcb->GuardedMutex); KeReleaseGuardedMutex(Mcb->GuardedMutex);
DPRINT("Done %d\n", Result); DPRINT("Done %u\n", Result);
return Result; return Result;
} }
@ -390,9 +390,9 @@ FsRtlGetNextBaseMcbEntry(IN PBASE_MCB OpaqueMcb,
break; break;
} }
if (RunFound) DPRINT("RunFound(%d %d %d)\n", RunFound->RunStartVbn.LowPart, RunFound->RunEndVbn.LowPart, RunFound->StartingLbn.LowPart); if (RunFound) DPRINT("RunFound(%lu %lu %lu)\n", RunFound->RunStartVbn.LowPart, RunFound->RunEndVbn.LowPart, RunFound->StartingLbn.LowPart);
if (RunFoundLower) DPRINT("RunFoundLower(%d %d %d)\n", RunFoundLower->RunStartVbn.LowPart, RunFoundLower->RunEndVbn.LowPart, RunFoundLower->StartingLbn.LowPart); if (RunFoundLower) DPRINT("RunFoundLower(%lu %lu %lu)\n", RunFoundLower->RunStartVbn.LowPart, RunFoundLower->RunEndVbn.LowPart, RunFoundLower->StartingLbn.LowPart);
if (RunFoundHigher) DPRINT("RunFoundHigher(%d %d %d)\n", RunFoundHigher->RunStartVbn.LowPart, RunFoundHigher->RunEndVbn.LowPart, RunFoundHigher->StartingLbn.LowPart); if (RunFoundHigher) DPRINT("RunFoundHigher(%lu %lu %lu)\n", RunFoundHigher->RunStartVbn.LowPart, RunFoundHigher->RunEndVbn.LowPart, RunFoundHigher->StartingLbn.LowPart);
if (RunFound) if (RunFound)
{ {
@ -440,7 +440,7 @@ FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb,
{ {
BOOLEAN Result; BOOLEAN Result;
DPRINT("FsRtlGetNextLargeMcbEntry Mcb %p RunIndex %d\n", Mcb, RunIndex); DPRINT("FsRtlGetNextLargeMcbEntry Mcb %p RunIndex %lu\n", Mcb, RunIndex);
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlGetNextBaseMcbEntry(&(Mcb->BaseMcb), Result = FsRtlGetNextBaseMcbEntry(&(Mcb->BaseMcb),
@ -450,7 +450,7 @@ FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb,
SectorCount); SectorCount);
KeReleaseGuardedMutex(Mcb->GuardedMutex); KeReleaseGuardedMutex(Mcb->GuardedMutex);
DPRINT("Done %d\n", Result); DPRINT("Done %u\n", Result);
return Result; return Result;
} }
@ -660,7 +660,7 @@ FsRtlLookupLargeMcbEntry(IN PLARGE_MCB Mcb,
{ {
BOOLEAN Result; BOOLEAN Result;
DPRINT("FsRtlLookupLargeMcbEntry Mcb %x Vbn %x\n", Mcb, (ULONG)Vbn); DPRINT("FsRtlLookupLargeMcbEntry Mcb %p Vbn %x\n", Mcb, (ULONG)Vbn);
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlLookupBaseMcbEntry(&(Mcb->BaseMcb), Result = FsRtlLookupBaseMcbEntry(&(Mcb->BaseMcb),
@ -672,7 +672,7 @@ FsRtlLookupLargeMcbEntry(IN PLARGE_MCB Mcb,
Index); Index);
KeReleaseGuardedMutex(Mcb->GuardedMutex); KeReleaseGuardedMutex(Mcb->GuardedMutex);
DPRINT("Done %d\n", Result); DPRINT("Done %u\n", Result);
return Result; return Result;
} }
@ -753,7 +753,7 @@ FsRtlLookupLastLargeMcbEntryAndIndex(IN PLARGE_MCB OpaqueMcb,
{ {
BOOLEAN Result; BOOLEAN Result;
DPRINT("FsRtlLookupLastLargeMcbEntryAndIndex %x\n", OpaqueMcb); DPRINT("FsRtlLookupLastLargeMcbEntryAndIndex %p\n", OpaqueMcb);
KeAcquireGuardedMutex(OpaqueMcb->GuardedMutex); KeAcquireGuardedMutex(OpaqueMcb->GuardedMutex);
Result = FsRtlLookupLastBaseMcbEntryAndIndex(&(OpaqueMcb->BaseMcb), Result = FsRtlLookupLastBaseMcbEntryAndIndex(&(OpaqueMcb->BaseMcb),
@ -762,7 +762,7 @@ FsRtlLookupLastLargeMcbEntryAndIndex(IN PLARGE_MCB OpaqueMcb,
Index); Index);
KeReleaseGuardedMutex(OpaqueMcb->GuardedMutex); KeReleaseGuardedMutex(OpaqueMcb->GuardedMutex);
DPRINT("Done %d\n", Result); DPRINT("Done %u\n", Result);
return Result; return Result;
} }
@ -792,7 +792,7 @@ FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb,
{ {
BOOLEAN Result; BOOLEAN Result;
DPRINT("FsRtlLookupLastLargeMcbEntry Mcb %x\n", Mcb); DPRINT("FsRtlLookupLastLargeMcbEntry Mcb %p\n", Mcb);
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlLookupLastBaseMcbEntry(&(Mcb->BaseMcb), Result = FsRtlLookupLastBaseMcbEntry(&(Mcb->BaseMcb),
@ -800,7 +800,7 @@ FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb,
Lbn); Lbn);
KeReleaseGuardedMutex(Mcb->GuardedMutex); KeReleaseGuardedMutex(Mcb->GuardedMutex);
DPRINT("Done %d\n", Result); DPRINT("Done %u\n", Result);
return Result; return Result;
} }
@ -841,14 +841,14 @@ FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb)
{ {
ULONG NumberOfRuns; ULONG NumberOfRuns;
DPRINT("FsRtlNumberOfRunsInLargeMcb Mcb %x\n", Mcb); DPRINT("FsRtlNumberOfRunsInLargeMcb Mcb %p\n", Mcb);
/* Read the number of runs while holding the MCB lock */ /* Read the number of runs while holding the MCB lock */
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
NumberOfRuns = FsRtlNumberOfRunsInBaseMcb(&(Mcb->BaseMcb)); NumberOfRuns = FsRtlNumberOfRunsInBaseMcb(&(Mcb->BaseMcb));
KeReleaseGuardedMutex(Mcb->GuardedMutex); KeReleaseGuardedMutex(Mcb->GuardedMutex);
DPRINT("Done %d\n", NumberOfRuns); DPRINT("Done %lu\n", NumberOfRuns);
/* Return the count */ /* Return the count */
return NumberOfRuns; return NumberOfRuns;
@ -920,7 +920,7 @@ FsRtlRemoveLargeMcbEntry(IN PLARGE_MCB Mcb,
IN LONGLONG Vbn, IN LONGLONG Vbn,
IN LONGLONG SectorCount) IN LONGLONG SectorCount)
{ {
DPRINT("FsRtlRemoveLargeMcbEntry Mcb %x, Vbn %I64d, SectorCount %I64d\n", Mcb, Vbn, SectorCount); DPRINT("FsRtlRemoveLargeMcbEntry Mcb %p, Vbn %I64d, SectorCount %I64d\n", Mcb, Vbn, SectorCount);
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
FsRtlRemoveBaseMcbEntry(&(Mcb->BaseMcb), Vbn, SectorCount); FsRtlRemoveBaseMcbEntry(&(Mcb->BaseMcb), Vbn, SectorCount);
@ -1033,7 +1033,7 @@ FsRtlSplitLargeMcb(IN PLARGE_MCB Mcb,
{ {
BOOLEAN Result; BOOLEAN Result;
DPRINT("FsRtlSplitLargeMcb %x, Vbn %x, Amount %x\n", Mcb, (ULONG)Vbn, (ULONG)Amount); DPRINT("FsRtlSplitLargeMcb %p, Vbn %x, Amount %x\n", Mcb, (ULONG)Vbn, (ULONG)Amount);
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlSplitBaseMcb(&(Mcb->BaseMcb), Result = FsRtlSplitBaseMcb(&(Mcb->BaseMcb),
@ -1041,7 +1041,7 @@ FsRtlSplitLargeMcb(IN PLARGE_MCB Mcb,
Amount); Amount);
KeReleaseGuardedMutex(Mcb->GuardedMutex); KeReleaseGuardedMutex(Mcb->GuardedMutex);
DPRINT("Done %d\n", Result); DPRINT("Done %u\n", Result);
return Result; return Result;
} }
@ -1066,7 +1066,7 @@ NTAPI
FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb, FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb,
IN LONGLONG Vbn) IN LONGLONG Vbn)
{ {
DPRINT("FsRtlTruncateLargeMcb %x Vbn %x\n", Mcb, (ULONG)Vbn); DPRINT("FsRtlTruncateLargeMcb %p Vbn %x\n", Mcb, (ULONG)Vbn);
KeAcquireGuardedMutex(Mcb->GuardedMutex); KeAcquireGuardedMutex(Mcb->GuardedMutex);
FsRtlTruncateBaseMcb(&(Mcb->BaseMcb), Vbn); FsRtlTruncateBaseMcb(&(Mcb->BaseMcb), Vbn);
KeReleaseGuardedMutex(Mcb->GuardedMutex); KeReleaseGuardedMutex(Mcb->GuardedMutex);

View file

@ -508,7 +508,7 @@ FsRtlNotifyFilterChangeDirectory(IN PNOTIFY_SYNC NotifySync,
PAGED_CODE(); PAGED_CODE();
DPRINT("FsRtlNotifyFilterChangeDirectory(): %p, %p, %p, %wZ, %d, %d, %u, %p, %p, %p, %p\n", DPRINT("FsRtlNotifyFilterChangeDirectory(): %p, %p, %p, %wZ, %u, %u, %u, %p, %p, %p, %p\n",
NotifySync, NotifyList, FsContext, FullDirectoryName, WatchTree, IgnoreBuffer, CompletionFilter, NotifyIrp, NotifySync, NotifyList, FsContext, FullDirectoryName, WatchTree, IgnoreBuffer, CompletionFilter, NotifyIrp,
TraverseCallback, SubjectContext, FilterCallback); TraverseCallback, SubjectContext, FilterCallback);

View file

@ -95,7 +95,7 @@ HalpAssignDrive(IN PUNICODE_STRING PartitionName,
} }
} }
DPRINT("DriveNumber %d\n", DriveNumber); DPRINT("DriveNumber %lu\n", DriveNumber);
/* Build drive name */ /* Build drive name */
swprintf(DriveNameBuffer, swprintf(DriveNameBuffer,
@ -369,7 +369,7 @@ xHalQueryDriveLayout(IN PUNICODE_STRING DeviceName,
} }
} }
DPRINT("DiskGeometry.BytesPerSector: %d\n", DPRINT("DiskGeometry.BytesPerSector: %lu\n",
DiskGeometry.BytesPerSector); DiskGeometry.BytesPerSector);
if (DeviceObject->Characteristics & FILE_REMOVABLE_MEDIA) if (DeviceObject->Characteristics & FILE_REMOVABLE_MEDIA)
@ -444,7 +444,7 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
RDiskCount = xHalpGetRDiskCount(); RDiskCount = xHalpGetRDiskCount();
DPRINT("RDiskCount %d\n", RDiskCount); DPRINT("RDiskCount %lu\n", RDiskCount);
Buffer1 = ExAllocatePoolWithTag(PagedPool, Buffer1 = ExAllocatePoolWithTag(PagedPool,
64 * sizeof(WCHAR), 64 * sizeof(WCHAR),
@ -493,14 +493,11 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
} }
/* Create PhysicalDrive links */ /* Create PhysicalDrive links */
DPRINT("Physical disk drives: %d\n", ConfigInfo->DiskCount); DPRINT("Physical disk drives: %lu\n", ConfigInfo->DiskCount);
for (i = 0; i < ConfigInfo->DiskCount; i++) for (i = 0; i < ConfigInfo->DiskCount; i++)
{ {
swprintf(Buffer1, swprintf(Buffer1, L"\\Device\\Harddisk%lu\\Partition0", i);
L"\\Device\\Harddisk%d\\Partition0", RtlInitUnicodeString(&UnicodeString1, Buffer1);
i);
RtlInitUnicodeString(&UnicodeString1,
Buffer1);
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString1, &UnicodeString1,
@ -518,11 +515,8 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
{ {
ZwClose(FileHandle); ZwClose(FileHandle);
swprintf(Buffer2, swprintf(Buffer2, L"\\??\\PhysicalDrive%lu", i);
L"\\??\\PhysicalDrive%d", RtlInitUnicodeString(&UnicodeString2, Buffer2);
i);
RtlInitUnicodeString(&UnicodeString2,
Buffer2);
DPRINT("Creating link: %S ==> %S\n", DPRINT("Creating link: %S ==> %S\n",
Buffer2, Buffer2,
@ -551,14 +545,10 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION)); ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION));
for (i = 0; i < ConfigInfo->DiskCount; i++) for (i = 0; i < ConfigInfo->DiskCount; i++)
{ {
swprintf(Buffer1, swprintf(Buffer1, L"\\Device\\Harddisk%lu\\Partition0", i);
L"\\Device\\Harddisk%d\\Partition0", RtlInitUnicodeString(&UnicodeString1, Buffer1);
i);
RtlInitUnicodeString(&UnicodeString1,
Buffer1);
Status = xHalQueryDriveLayout(&UnicodeString1, Status = xHalQueryDriveLayout(&UnicodeString1, &LayoutArray[i]);
&LayoutArray[i]);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DbgPrint("xHalQueryDriveLayout() failed (Status = 0x%lx)\n", DbgPrint("xHalQueryDriveLayout() failed (Status = 0x%lx)\n",
@ -637,11 +627,10 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
LayoutArray[i]->PartitionEntry[j].RewritePartition == FALSE) LayoutArray[i]->PartitionEntry[j].RewritePartition == FALSE)
{ {
swprintf(Buffer2, swprintf(Buffer2,
L"\\Device\\Harddisk%d\\Partition%d", L"\\Device\\Harddisk%lu\\Partition%lu",
i, i,
LayoutArray[i]->PartitionEntry[j].PartitionNumber); LayoutArray[i]->PartitionEntry[j].PartitionNumber);
RtlInitUnicodeString(&UnicodeString2, RtlInitUnicodeString(&UnicodeString2, Buffer2);
Buffer2);
/* Assign drive */ /* Assign drive */
DPRINT(" %wZ\n", &UnicodeString2); DPRINT(" %wZ\n", &UnicodeString2);
@ -689,11 +678,10 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
if (LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition == FALSE) if (LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition == FALSE)
{ {
swprintf(Buffer2, swprintf(Buffer2,
L"\\Device\\Harddisk%lu\\Partition%d", L"\\Device\\Harddisk%lu\\Partition%lu",
DiskNumber, DiskNumber,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber); LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
RtlInitUnicodeString(&UnicodeString2, RtlInitUnicodeString(&UnicodeString2, Buffer2);
Buffer2);
/* Assign drive */ /* Assign drive */
DPRINT(" %wZ\n", &UnicodeString2); DPRINT(" %wZ\n", &UnicodeString2);
@ -730,11 +718,10 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType)) IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType))
{ {
swprintf(Buffer2, swprintf(Buffer2,
L"\\Device\\Harddisk%d\\Partition%d", L"\\Device\\Harddisk%lu\\Partition%lu",
DiskNumber, DiskNumber,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber); LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
RtlInitUnicodeString(&UnicodeString2, RtlInitUnicodeString(&UnicodeString2, Buffer2);
Buffer2);
/* Assign drive */ /* Assign drive */
DPRINT(" %wZ\n", DPRINT(" %wZ\n",
@ -771,11 +758,10 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0) LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0)
{ {
swprintf(Buffer2, swprintf(Buffer2,
L"\\Device\\Harddisk%d\\Partition%d", L"\\Device\\Harddisk%lu\\Partition%lu",
DiskNumber, DiskNumber,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber); LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
RtlInitUnicodeString(&UnicodeString2, RtlInitUnicodeString(&UnicodeString2, Buffer2);
Buffer2);
/* Assign drive */ /* Assign drive */
DPRINT(" %wZ\n", DPRINT(" %wZ\n",
@ -808,11 +794,10 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType)) IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType))
{ {
swprintf(Buffer2, swprintf(Buffer2,
L"\\Device\\Harddisk%d\\Partition%d", L"\\Device\\Harddisk%lu\\Partition%lu",
DiskNumber, DiskNumber,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber); LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
RtlInitUnicodeString(&UnicodeString2, RtlInitUnicodeString(&UnicodeString2, Buffer2);
Buffer2);
/* Assign drive */ /* Assign drive */
DPRINT(" %wZ\n", DPRINT(" %wZ\n",
@ -846,11 +831,10 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0) LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0)
{ {
swprintf(Buffer2, swprintf(Buffer2,
L"\\Device\\Harddisk%d\\Partition%d", L"\\Device\\Harddisk%lu\\Partition%lu",
DiskNumber, DiskNumber,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber); LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
RtlInitUnicodeString(&UnicodeString2, RtlInitUnicodeString(&UnicodeString2, Buffer2);
Buffer2);
/* Assign drive */ /* Assign drive */
DPRINT(" %wZ\n", DPRINT(" %wZ\n",
@ -880,11 +864,8 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
if (LayoutArray[i]->PartitionCount == 1 && if (LayoutArray[i]->PartitionCount == 1 &&
LayoutArray[i]->PartitionEntry[0].PartitionType == 0) LayoutArray[i]->PartitionEntry[0].PartitionType == 0)
{ {
swprintf(Buffer2, swprintf(Buffer2, L"\\Device\\Harddisk%lu\\Partition1", i);
L"\\Device\\Harddisk%d\\Partition1", RtlInitUnicodeString(&UnicodeString2, Buffer2);
i);
RtlInitUnicodeString(&UnicodeString2,
Buffer2);
/* Assign drive */ /* Assign drive */
DPRINT(" %wZ\n", DPRINT(" %wZ\n",
@ -911,14 +892,11 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
end_assign_disks: end_assign_disks:
/* Assign floppy drives */ /* Assign floppy drives */
DPRINT("Floppy drives: %d\n", ConfigInfo->FloppyCount); DPRINT("Floppy drives: %lu\n", ConfigInfo->FloppyCount);
for (i = 0; i < ConfigInfo->FloppyCount; i++) for (i = 0; i < ConfigInfo->FloppyCount; i++)
{ {
swprintf(Buffer1, swprintf(Buffer1, L"\\Device\\Floppy%lu", i);
L"\\Device\\Floppy%d", RtlInitUnicodeString(&UnicodeString1, Buffer1);
i);
RtlInitUnicodeString(&UnicodeString1,
Buffer1);
/* Assign drive letters A: or B: or first free drive letter */ /* Assign drive letters A: or B: or first free drive letter */
DPRINT(" %wZ\n", DPRINT(" %wZ\n",
@ -934,14 +912,11 @@ end_assign_disks:
} }
/* Assign cdrom drives */ /* Assign cdrom drives */
DPRINT("CD-Rom drives: %d\n", ConfigInfo->CdRomCount); DPRINT("CD-Rom drives: %lu\n", ConfigInfo->CdRomCount);
for (i = 0; i < ConfigInfo->CdRomCount; i++) for (i = 0; i < ConfigInfo->CdRomCount; i++)
{ {
swprintf(Buffer1, swprintf(Buffer1, L"\\Device\\CdRom%lu", i);
L"\\Device\\CdRom%d", RtlInitUnicodeString(&UnicodeString1, Buffer1);
i);
RtlInitUnicodeString(&UnicodeString1,
Buffer1);
/* Assign first free drive letter */ /* Assign first free drive letter */
DPRINT(" %wZ\n", &UnicodeString1); DPRINT(" %wZ\n", &UnicodeString1);
@ -1731,7 +1706,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
/* Also update the maximum sector */ /* Also update the maximum sector */
MaxSector = GET_PARTITION_LENGTH(PartitionDescriptor); MaxSector = GET_PARTITION_LENGTH(PartitionDescriptor);
DPRINT1("FSTUB: MaxSector now = %#08lx\n", MaxSector); DPRINT1("FSTUB: MaxSector now = %I64d\n", MaxSector);
break; break;
} }
} }
@ -1768,7 +1743,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
DPRINT1("FSTUB: Drive %#p has no valid MBR. Make it into a " DPRINT1("FSTUB: Drive %#p has no valid MBR. Make it into a "
"super-floppy\n", "super-floppy\n",
DeviceObject); DeviceObject);
DPRINT1("FSTUB: Drive has %#08lx sectors and is %#016I64x " DPRINT1("FSTUB: Drive has %I64d sectors and is %#016I64x "
"bytes large\n", "bytes large\n",
EndSector, EndSector * DiskGeometry.BytesPerSector); EndSector, EndSector * DiskGeometry.BytesPerSector);

View file

@ -543,7 +543,7 @@ FstubDbgPrintDriveLayoutEx(IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout)
case PARTITION_STYLE_MBR: case PARTITION_STYLE_MBR:
if (DriveLayout->PartitionCount % 4 != 0) if (DriveLayout->PartitionCount % 4 != 0)
{ {
DPRINT("Warning: Partition count isn't a 4-factor: %ld!\n", DriveLayout->PartitionCount); DPRINT("Warning: Partition count isn't a 4-factor: %lu!\n", DriveLayout->PartitionCount);
} }
DPRINT("Signature: %8.8x\n", DriveLayout->Mbr.Signature); DPRINT("Signature: %8.8x\n", DriveLayout->Mbr.Signature);
@ -558,7 +558,7 @@ FstubDbgPrintDriveLayoutEx(IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout)
DPRINT("DiskId: %s\n", Guid); DPRINT("DiskId: %s\n", Guid);
DPRINT("StartingUsableOffset: %I64x\n", DriveLayout->Gpt.StartingUsableOffset.QuadPart); DPRINT("StartingUsableOffset: %I64x\n", DriveLayout->Gpt.StartingUsableOffset.QuadPart);
DPRINT("UsableLength: %I64x\n", DriveLayout->Gpt.UsableLength.QuadPart); DPRINT("UsableLength: %I64x\n", DriveLayout->Gpt.UsableLength.QuadPart);
DPRINT("MaxPartitionCount: %ld\n", DriveLayout->Gpt.MaxPartitionCount); DPRINT("MaxPartitionCount: %lu\n", DriveLayout->Gpt.MaxPartitionCount);
for (i = 0; i < DriveLayout->PartitionCount; i++) for (i = 0; i < DriveLayout->PartitionCount; i++)
{ {
FstubDbgPrintPartitionEx(DriveLayout->PartitionEntry, i); FstubDbgPrintPartitionEx(DriveLayout->PartitionEntry, i);
@ -566,7 +566,7 @@ FstubDbgPrintDriveLayoutEx(IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout)
break; break;
default: default:
DPRINT("Unsupported partition style: %ld\n", DriveLayout->PartitionStyle); DPRINT("Unsupported partition style: %lu\n", DriveLayout->PartitionStyle);
} }
} }
@ -578,29 +578,29 @@ FstubDbgPrintPartitionEx(IN PPARTITION_INFORMATION_EX PartitionEntry,
CHAR Guid[38]; CHAR Guid[38];
PAGED_CODE(); PAGED_CODE();
DPRINT("Printing partition %ld\n", PartitionNumber); DPRINT("Printing partition %lu\n", PartitionNumber);
switch (PartitionEntry[PartitionNumber].PartitionStyle) switch (PartitionEntry[PartitionNumber].PartitionStyle)
{ {
case PARTITION_STYLE_MBR: case PARTITION_STYLE_MBR:
DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.QuadPart); DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.QuadPart);
DPRINT(" PartitionLength: %I64x\n", PartitionEntry[PartitionNumber].PartitionLength.QuadPart); DPRINT(" PartitionLength: %I64x\n", PartitionEntry[PartitionNumber].PartitionLength.QuadPart);
DPRINT(" RewritePartition: %d\n", PartitionEntry[PartitionNumber].RewritePartition); DPRINT(" RewritePartition: %u\n", PartitionEntry[PartitionNumber].RewritePartition);
DPRINT(" PartitionType: %02x\n", PartitionEntry[PartitionNumber].Mbr.PartitionType); DPRINT(" PartitionType: %02x\n", PartitionEntry[PartitionNumber].Mbr.PartitionType);
DPRINT(" BootIndicator: %d\n", PartitionEntry[PartitionNumber].Mbr.BootIndicator); DPRINT(" BootIndicator: %u\n", PartitionEntry[PartitionNumber].Mbr.BootIndicator);
DPRINT(" RecognizedPartition: %d\n", PartitionEntry[PartitionNumber].Mbr.RecognizedPartition); DPRINT(" RecognizedPartition: %u\n", PartitionEntry[PartitionNumber].Mbr.RecognizedPartition);
DPRINT(" HiddenSectors: %ld\n", PartitionEntry[PartitionNumber].Mbr.HiddenSectors); DPRINT(" HiddenSectors: %lu\n", PartitionEntry[PartitionNumber].Mbr.HiddenSectors);
break; break;
case PARTITION_STYLE_GPT: case PARTITION_STYLE_GPT:
DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.QuadPart); DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.QuadPart);
DPRINT(" PartitionLength: %I64x\n", PartitionEntry[PartitionNumber].PartitionLength.QuadPart); DPRINT(" PartitionLength: %I64x\n", PartitionEntry[PartitionNumber].PartitionLength.QuadPart);
DPRINT(" RewritePartition: %d\n", PartitionEntry[PartitionNumber].RewritePartition); DPRINT(" RewritePartition: %u\n", PartitionEntry[PartitionNumber].RewritePartition);
FstubDbgGuidToString(&(PartitionEntry[PartitionNumber].Gpt.PartitionType), Guid); FstubDbgGuidToString(&(PartitionEntry[PartitionNumber].Gpt.PartitionType), Guid);
DPRINT(" PartitionType: %s\n", Guid); DPRINT(" PartitionType: %s\n", Guid);
FstubDbgGuidToString(&(PartitionEntry[PartitionNumber].Gpt.PartitionId), Guid); FstubDbgGuidToString(&(PartitionEntry[PartitionNumber].Gpt.PartitionId), Guid);
DPRINT(" PartitionId: %s\n", Guid); DPRINT(" PartitionId: %s\n", Guid);
DPRINT(" Attributes: %16x\n", PartitionEntry[PartitionNumber].Gpt.Attributes); DPRINT(" Attributes: %I64x\n", PartitionEntry[PartitionNumber].Gpt.Attributes);
DPRINT(" Name: %ws\n", PartitionEntry[PartitionNumber].Gpt.Name); DPRINT(" Name: %ws\n", PartitionEntry[PartitionNumber].Gpt.Name);
break; break;
@ -618,7 +618,7 @@ FstubDbgPrintSetPartitionEx(IN PSET_PARTITION_INFORMATION_EX PartitionEntry,
PAGED_CODE(); PAGED_CODE();
DPRINT("FSTUB: SET_PARTITION_INFORMATION_EX: %p\n", PartitionEntry); DPRINT("FSTUB: SET_PARTITION_INFORMATION_EX: %p\n", PartitionEntry);
DPRINT("Modifying partition %ld\n", PartitionNumber); DPRINT("Modifying partition %lu\n", PartitionNumber);
switch (PartitionEntry->PartitionStyle) switch (PartitionEntry->PartitionStyle)
{ {
case PARTITION_STYLE_MBR: case PARTITION_STYLE_MBR:
@ -630,7 +630,7 @@ FstubDbgPrintSetPartitionEx(IN PSET_PARTITION_INFORMATION_EX PartitionEntry,
DPRINT(" PartitionType: %s\n", Guid); DPRINT(" PartitionType: %s\n", Guid);
FstubDbgGuidToString(&(PartitionEntry->Gpt.PartitionId), Guid); FstubDbgGuidToString(&(PartitionEntry->Gpt.PartitionId), Guid);
DPRINT(" PartitionId: %s\n", Guid); DPRINT(" PartitionId: %s\n", Guid);
DPRINT(" Attributes: %16x\n", PartitionEntry->Gpt.Attributes); DPRINT(" Attributes: %I64x\n", PartitionEntry->Gpt.Attributes);
DPRINT(" Name: %ws\n", PartitionEntry->Gpt.Name); DPRINT(" Name: %ws\n", PartitionEntry->Gpt.Name);
break; break;
@ -2399,7 +2399,7 @@ IoWritePartitionTableEx(IN PDEVICE_OBJECT DeviceObject,
break; break;
default: default:
DPRINT("Unsupported partition style: %ld\n", DriveLayout->PartitionStyle); DPRINT("Unsupported partition style: %lu\n", DriveLayout->PartitionStyle);
Status = STATUS_NOT_SUPPORTED; Status = STATUS_NOT_SUPPORTED;
} }

View file

@ -725,7 +725,7 @@ IoGetDeviceInterfaces(IN CONST GUID *InterfaceClassGuid,
} }
else if (bip->DataLength < 5 * sizeof(WCHAR)) else if (bip->DataLength < 5 * sizeof(WCHAR))
{ {
DPRINT("Registry string too short (length %lu, expected %lu at least)\n", bip->DataLength < 5 * sizeof(WCHAR)); DPRINT("Registry string too short (length %lu, expected %lu at least)\n", bip->DataLength, 5 * sizeof(WCHAR));
Status = STATUS_UNSUCCESSFUL; Status = STATUS_UNSUCCESSFUL;
goto cleanup; goto cleanup;
} }
@ -1245,7 +1245,7 @@ IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName,
if (SymbolicLinkName == NULL) if (SymbolicLinkName == NULL)
return STATUS_INVALID_PARAMETER_1; return STATUS_INVALID_PARAMETER_1;
DPRINT("IoSetDeviceInterfaceState('%wZ', %d)\n", SymbolicLinkName, Enable); DPRINT("IoSetDeviceInterfaceState('%wZ', %u)\n", SymbolicLinkName, Enable);
/* Symbolic link name is \??\ACPI#PNP0501#1#{GUID}\ReferenceString */ /* Symbolic link name is \??\ACPI#PNP0501#1#{GUID}\ReferenceString */
/* Get GUID from SymbolicLinkName */ /* Get GUID from SymbolicLinkName */
@ -1261,7 +1261,7 @@ IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName,
SymLink.Buffer = SymbolicLinkName->Buffer; SymLink.Buffer = SymbolicLinkName->Buffer;
SymLink.MaximumLength = SymLink.Length = (USHORT)((ULONG_PTR)(EndPosition + 1) - (ULONG_PTR)SymLink.Buffer); SymLink.MaximumLength = SymLink.Length = (USHORT)((ULONG_PTR)(EndPosition + 1) - (ULONG_PTR)SymLink.Buffer);
DPRINT("IoSetDeviceInterfaceState('%wZ', %d)\n", SymbolicLinkName, Enable); DPRINT("IoSetDeviceInterfaceState('%wZ', %u)\n", SymbolicLinkName, Enable);
Status = OpenRegistryHandlesFromSymbolicLink(SymbolicLinkName, Status = OpenRegistryHandlesFromSymbolicLink(SymbolicLinkName,
KEY_CREATE_SUB_KEY, KEY_CREATE_SUB_KEY,

View file

@ -1167,7 +1167,7 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
LPWSTR Start; LPWSTR Start;
BOOLEAN SafeToUnload = TRUE; BOOLEAN SafeToUnload = TRUE;
DPRINT("IopUnloadDriver('%wZ', %d)\n", DriverServiceName, UnloadPnpDrivers); DPRINT("IopUnloadDriver('%wZ', %u)\n", DriverServiceName, UnloadPnpDrivers);
PAGED_CODE(); PAGED_CODE();
@ -1608,7 +1608,7 @@ try_again:
if (!DriverObject->MajorFunction[i]) if (!DriverObject->MajorFunction[i])
{ {
/* Print a warning in the debug log */ /* Print a warning in the debug log */
DPRINT1("Driver <%wZ> set DriverObject->MajorFunction[%d] to NULL!\n", DPRINT1("Driver <%wZ> set DriverObject->MajorFunction[%lu] to NULL!\n",
&DriverObject->DriverName, i); &DriverObject->DriverName, i);
/* Fix it up */ /* Fix it up */

View file

@ -209,7 +209,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
ACCESS_MASK DesiredAccess; ACCESS_MASK DesiredAccess;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
ULONG BufferLength; ULONG BufferLength;
IOTRACE(IO_CTL_DEBUG, "Handle: %lx. CTL: %lx. Type: %lx \n", IOTRACE(IO_CTL_DEBUG, "Handle: %p. CTL: %lx. Type: %lx \n",
DeviceHandle, IoControlCode, IsDevIoCtl); DeviceHandle, IoControlCode, IsDevIoCtl);
/* Get the access type */ /* Get the access type */

View file

@ -175,7 +175,7 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock,
{ {
DPRINT("Lock %#08lx (with tag %#08lx) was supposed to be held at max %I64d ticks but lasted longer\n", DPRINT("Lock %#08lx (with tag %#08lx) was supposed to be held at max %I64d ticks but lasted longer\n",
Lock, TrackingBlock->Tag, Lock->Dbg.MaxLockedTicks); Lock, TrackingBlock->Tag, Lock->Dbg.MaxLockedTicks);
DPRINT("Lock was acquired in file %s at line %d\n", TrackingBlock->File, TrackingBlock->Line); DPRINT("Lock was acquired in file %s at line %lu\n", TrackingBlock->File, TrackingBlock->Line);
ASSERT(FALSE); ASSERT(FALSE);
} }
@ -270,7 +270,7 @@ IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock,
/* Tag should match */ /* Tag should match */
if (TrackingBlock->Tag != Tag) if (TrackingBlock->Tag != Tag)
{ {
DPRINT("Last tracking block tag invalid! Expected: %x, having: %x\n", Tag, TrackingBlock->Tag); DPRINT("Last tracking block tag invalid! Expected: %p, having: %p\n", Tag, TrackingBlock->Tag);
ASSERT(TrackingBlock->Tag != Tag); ASSERT(TrackingBlock->Tag != Tag);
} }

View file

@ -827,7 +827,7 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
IN OUT PVOID Buffer, IN OUT PVOID Buffer,
IN ULONG BufferLength) IN ULONG BufferLength)
{ {
DPRINT("NtPlugPlayControl(%lu %p %lu) called\n", DPRINT("NtPlugPlayControl(%d %p %lu) called\n",
PlugPlayControlClass, Buffer, BufferLength); PlugPlayControlClass, Buffer, BufferLength);
/* Function can only be called from user-mode */ /* Function can only be called from user-mode */

View file

@ -1365,7 +1365,7 @@ IopTraverseDeviceTree(PDEVICETREE_TRAVERSE_CONTEXT Context)
DPRINT("Context 0x%p\n", Context); DPRINT("Context 0x%p\n", Context);
DPRINT("IopTraverseDeviceTree(DeviceNode 0x%p FirstDeviceNode 0x%p Action %x Context 0x%p)\n", DPRINT("IopTraverseDeviceTree(DeviceNode 0x%p FirstDeviceNode 0x%p Action %p Context 0x%p)\n",
Context->DeviceNode, Context->FirstDeviceNode, Context->Action, Context->Context); Context->DeviceNode, Context->FirstDeviceNode, Context->Action, Context->Context);
/* Start from the specified device node */ /* Start from the specified device node */

View file

@ -262,7 +262,7 @@ IopFixupResourceListWithRequirements(
/* Check if we couldn't satsify a requirement or its alternates */ /* Check if we couldn't satsify a requirement or its alternates */
if (AlternateRequired && !(IoDesc->Option & IO_RESOURCE_ALTERNATIVE)) if (AlternateRequired && !(IoDesc->Option & IO_RESOURCE_ALTERNATIVE))
{ {
DPRINT1("Unable to satisfy preferred resource or alternates in list %d\n", i); DPRINT1("Unable to satisfy preferred resource or alternates in list %lu\n", i);
/* Break out of this loop and try the next list */ /* Break out of this loop and try the next list */
break; break;
@ -444,7 +444,7 @@ IopFixupResourceListWithRequirements(
if (!FoundResource && IoDesc->Option == 0) if (!FoundResource && IoDesc->Option == 0)
{ {
/* Break out of this loop and try the next list */ /* Break out of this loop and try the next list */
DPRINT1("Unable to satisfy required resource in list %d\n", i); DPRINT1("Unable to satisfy required resource in list %lu\n", i);
break; break;
} }
else if (!FoundResource) else if (!FoundResource)
@ -509,7 +509,7 @@ IopFixupResourceListWithRequirements(
/* Check if we need an alternate with no resources left */ /* Check if we need an alternate with no resources left */
if (AlternateRequired) if (AlternateRequired)
{ {
DPRINT1("Unable to satisfy preferred resource or alternates in list %d\n", i); DPRINT1("Unable to satisfy preferred resource or alternates in list %lu\n", i);
/* Try the next alternate list */ /* Try the next alternate list */
continue; continue;

View file

@ -271,7 +271,7 @@ tryagain:
Status = LocateChildDevice(DeviceExtension, DevicePath, InstancePath, &Device); Status = LocateChildDevice(DeviceExtension, DevicePath, InstancePath, &Device);
if (Status != STATUS_NO_SUCH_DEVICE || NextInstance > 9999) if (Status != STATUS_NO_SUCH_DEVICE || NextInstance > 9999)
{ {
DPRINT1("NextInstance value is corrupt! (%d)\n", NextInstance); DPRINT1("NextInstance value is corrupt! (%lu)\n", NextInstance);
RtlDeleteRegistryValue(RTL_REGISTRY_HANDLE, RtlDeleteRegistryValue(RTL_REGISTRY_HANDLE,
(PWSTR)DeviceKeyHandle, (PWSTR)DeviceKeyHandle,
L"NextInstance"); L"NextInstance");

View file

@ -794,7 +794,7 @@ KiGetCacheInformation(VOID)
/* Set the cache line */ /* Set the cache line */
if (CacheLine > KeLargestCacheLine) KeLargestCacheLine = CacheLine; if (CacheLine > KeLargestCacheLine) KeLargestCacheLine = CacheLine;
DPRINT1("Prefetch Cache: %d bytes\tL2 Cache: %d bytes\tL2 Cache Line: %d bytes\tL2 Cache Associativity: %d\n", DPRINT1("Prefetch Cache: %lu bytes\tL2 Cache: %lu bytes\tL2 Cache Line: %lu bytes\tL2 Cache Associativity: %lu\n",
KePrefetchNTAGranularity, KePrefetchNTAGranularity,
Pcr->SecondLevelCacheSize, Pcr->SecondLevelCacheSize,
KeLargestCacheLine, KeLargestCacheLine,

View file

@ -1060,7 +1060,7 @@ DispatchToUser:
} }
/* 3rd strike, kill the process */ /* 3rd strike, kill the process */
DPRINT1("Kill %.16s, ExceptionCode: %lx, ExceptionAddress: %lx, BaseAddress: %lx\n", DPRINT1("Kill %.16s, ExceptionCode: %lx, ExceptionAddress: %p, BaseAddress: %p\n",
PsGetCurrentProcess()->ImageFileName, PsGetCurrentProcess()->ImageFileName,
ExceptionRecord->ExceptionCode, ExceptionRecord->ExceptionCode,
ExceptionRecord->ExceptionAddress, ExceptionRecord->ExceptionAddress,

View file

@ -77,8 +77,7 @@ KeSetBaseGdtSelector(ULONG Entry,
KIRQL oldIrql; KIRQL oldIrql;
PUSHORT Gdt; PUSHORT Gdt;
DPRINT("KeSetBaseGdtSelector(Entry %x, Base %x)\n", DPRINT("KeSetBaseGdtSelector(Entry %x, Base %p)\n", Entry, Base);
Entry, Base);
KeAcquireSpinLock(&GdtLock, &oldIrql); KeAcquireSpinLock(&GdtLock, &oldIrql);

View file

@ -247,7 +247,7 @@ Ki386FreeIdentityMap(PLARGE_IDENTITY_MAP IdentityMap)
{ {
ULONG Page; ULONG Page;
DPRINT("Freeing %d pages allocated for identity mapping\n", IdentityMap->PagesCount); DPRINT("Freeing %lu pages allocated for identity mapping\n", IdentityMap->PagesCount);
/* Free all allocated pages, if any */ /* Free all allocated pages, if any */
for (Page = 0; Page < IdentityMap->PagesCount; Page++) for (Page = 0; Page < IdentityMap->PagesCount; Page++)

View file

@ -978,7 +978,7 @@ KiTrap0DHandler(IN PKTRAP_FRAME TrapFrame)
} }
/* Check for privileged instructions */ /* Check for privileged instructions */
DPRINT("Instruction (%d) at fault: %lx %lx %lx %lx\n", DPRINT("Instruction (%lu) at fault: %lx %lx %lx %lx\n",
i, i,
Instructions[i], Instructions[i],
Instructions[i + 1], Instructions[i + 1],

View file

@ -68,7 +68,7 @@ KiInsertTimerTable(IN PKTIMER Timer,
BOOLEAN Expired = FALSE; BOOLEAN Expired = FALSE;
PLIST_ENTRY ListHead, NextEntry; PLIST_ENTRY ListHead, NextEntry;
PKTIMER CurrentTimer; PKTIMER CurrentTimer;
DPRINT("KiInsertTimerTable(): Timer %p, Hand: %d\n", Timer, Hand); DPRINT("KiInsertTimerTable(): Timer %p, Hand: %lu\n", Timer, Hand);
/* Check if the period is zero */ /* Check if the period is zero */
if (!Timer->Period) Timer->Header.SignalState = FALSE; if (!Timer->Period) Timer->Header.SignalState = FALSE;

View file

@ -227,7 +227,7 @@ NtAcceptConnectPort(OUT PHANDLE PortHandle,
/* Otherwise, quit */ /* Otherwise, quit */
ObDereferenceObject(ServerPort); ObDereferenceObject(ServerPort);
DPRINT1("Client section mapping failed: %lx\n", Status); DPRINT1("Client section mapping failed: %lx\n", Status);
DPRINT1("View base, offset, size: %lx %lx %lx\n", DPRINT1("View base, offset, size: %p %lx %p\n",
ServerPort->ClientSectionBase, ServerPort->ClientSectionBase,
ConnectMessage->ClientView.ViewSize, ConnectMessage->ClientView.ViewSize,
SectionOffset); SectionOffset);
@ -270,7 +270,7 @@ NtAcceptConnectPort(OUT PHANDLE PortHandle,
/* Return the handle to user mode */ /* Return the handle to user mode */
*PortHandle = Handle; *PortHandle = Handle;
LPCTRACE(LPC_COMPLETE_DEBUG, LPCTRACE(LPC_COMPLETE_DEBUG,
"Handle: %lx. Messages: %p/%p. Ports: %p/%p/%p\n", "Handle: %p. Messages: %p/%p. Ports: %p/%p/%p\n",
Handle, Handle,
Message, Message,
ConnectMessage, ConnectMessage,
@ -327,7 +327,7 @@ NtCompleteConnectPort(IN HANDLE PortHandle)
KPROCESSOR_MODE PreviousMode = KeGetPreviousMode(); KPROCESSOR_MODE PreviousMode = KeGetPreviousMode();
PETHREAD Thread; PETHREAD Thread;
PAGED_CODE(); PAGED_CODE();
LPCTRACE(LPC_COMPLETE_DEBUG, "Handle: %lx\n", PortHandle); LPCTRACE(LPC_COMPLETE_DEBUG, "Handle: %p\n", PortHandle);
/* Get the Port Object */ /* Get the Port Object */
Status = ObReferenceObjectByHandle(PortHandle, Status = ObReferenceObjectByHandle(PortHandle,

View file

@ -481,7 +481,7 @@ NtSecureConnectPort(OUT PHANDLE PortHandle,
/* Return the handle */ /* Return the handle */
*PortHandle = Handle; *PortHandle = Handle;
LPCTRACE(LPC_CONNECT_DEBUG, LPCTRACE(LPC_CONNECT_DEBUG,
"Handle: %lx. Length: %lx\n", "Handle: %p. Length: %lx\n",
Handle, Handle,
PortMessageLength); PortMessageLength);

View file

@ -143,7 +143,7 @@ LpcpCreatePort(OUT PHANDLE PortHandle,
PortHandle); PortHandle);
/* Return success or the error */ /* Return success or the error */
LPCTRACE(LPC_CREATE_DEBUG, "Port: %p. Handle: %lx\n", Port, *PortHandle); LPCTRACE(LPC_CREATE_DEBUG, "Port: %p. Handle: %p\n", Port, *PortHandle);
return Status; return Status;
} }

View file

@ -24,7 +24,7 @@ NtListenPort(IN HANDLE PortHandle,
{ {
NTSTATUS Status; NTSTATUS Status;
PAGED_CODE(); PAGED_CODE();
LPCTRACE(LPC_LISTEN_DEBUG, "Handle: %lx\n", PortHandle); LPCTRACE(LPC_LISTEN_DEBUG, "Handle: %p\n", PortHandle);
/* Wait forever for a connection request. */ /* Wait forever for a connection request. */
for (;;) for (;;)

View file

@ -152,7 +152,7 @@ NtReplyPort(IN HANDLE PortHandle,
PAGED_CODE(); PAGED_CODE();
LPCTRACE(LPC_REPLY_DEBUG, LPCTRACE(LPC_REPLY_DEBUG,
"Handle: %lx. Message: %p.\n", "Handle: %p. Message: %p.\n",
PortHandle, PortHandle,
ReplyMessage); ReplyMessage);
@ -329,7 +329,7 @@ NtReplyWaitReceivePortEx(IN HANDLE PortHandle,
PAGED_CODE(); PAGED_CODE();
LPCTRACE(LPC_REPLY_DEBUG, LPCTRACE(LPC_REPLY_DEBUG,
"Handle: %lx. Messages: %p/%p. Context: %p\n", "Handle: %p. Messages: %p/%p. Context: %p\n",
PortHandle, PortHandle,
ReplyMessage, ReplyMessage,
ReceiveMessage, ReceiveMessage,
@ -670,7 +670,7 @@ NtReplyWaitReceivePortEx(IN HANDLE PortHandle,
Cleanup: Cleanup:
/* All done, dereference the port and return the status */ /* All done, dereference the port and return the status */
LPCTRACE(LPC_REPLY_DEBUG, LPCTRACE(LPC_REPLY_DEBUG,
"Port: %p. Status: %p\n", "Port: %p. Status: %d\n",
Port, Port,
Status); Status);
if (ConnectionPort) ObDereferenceObject(ConnectionPort); if (ConnectionPort) ObDereferenceObject(ConnectionPort);

View file

@ -427,7 +427,7 @@ LpcRequestWaitReplyPort(IN PVOID PortObject,
/* All done */ /* All done */
LPCTRACE(LPC_SEND_DEBUG, LPCTRACE(LPC_SEND_DEBUG,
"Port: %p. Status: %p\n", "Port: %p. Status: %d\n",
Port, Port,
Status); Status);
@ -454,7 +454,7 @@ NtRequestPort(IN HANDLE PortHandle,
ULONG MessageType; ULONG MessageType;
PAGED_CODE(); PAGED_CODE();
LPCTRACE(LPC_SEND_DEBUG, LPCTRACE(LPC_SEND_DEBUG,
"Handle: %lx. Message: %p. Type: %lx\n", "Handle: %p. Message: %p. Type: %lx\n",
PortHandle, PortHandle,
LpcRequest, LpcRequest,
LpcpGetMessageType(LpcRequest)); LpcpGetMessageType(LpcRequest));
@ -621,7 +621,7 @@ NtRequestPort(IN HANDLE PortHandle,
/* All done with a failure*/ /* All done with a failure*/
LPCTRACE(LPC_SEND_DEBUG, LPCTRACE(LPC_SEND_DEBUG,
"Port: %p. Status: %p\n", "Port: %p. Status: %d\n",
Port, Port,
Status); Status);
@ -652,7 +652,7 @@ NtRequestWaitReplyPort(IN HANDLE PortHandle,
ULONG MessageType; ULONG MessageType;
PAGED_CODE(); PAGED_CODE();
LPCTRACE(LPC_SEND_DEBUG, LPCTRACE(LPC_SEND_DEBUG,
"Handle: %lx. Messages: %p/%p. Type: %lx\n", "Handle: %p. Messages: %p/%p. Type: %lx\n",
PortHandle, PortHandle,
LpcRequest, LpcRequest,
LpcReply, LpcReply,
@ -914,7 +914,7 @@ NtRequestWaitReplyPort(IN HANDLE PortHandle,
/* All done */ /* All done */
LPCTRACE(LPC_SEND_DEBUG, LPCTRACE(LPC_SEND_DEBUG,
"Port: %p. Status: %p\n", "Port: %p. Status: %d\n",
Port, Port,
Status); Status);
ObDereferenceObject(Port); ObDereferenceObject(Port);

View file

@ -1613,7 +1613,7 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType,
// //
if (ExpPoolFlags & POOL_FLAG_DBGPRINT_ON_FAILURE) if (ExpPoolFlags & POOL_FLAG_DBGPRINT_ON_FAILURE)
{ {
DPRINT1("EX: ExAllocatePool (%p, 0x%x) returning NULL\n", DPRINT1("EX: ExAllocatePool (%lu, 0x%x) returning NULL\n",
NumberOfBytes, NumberOfBytes,
OriginalType); OriginalType);
if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint(); if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint();
@ -1937,7 +1937,7 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType,
// //
if (ExpPoolFlags & POOL_FLAG_DBGPRINT_ON_FAILURE) if (ExpPoolFlags & POOL_FLAG_DBGPRINT_ON_FAILURE)
{ {
DPRINT1("EX: ExAllocatePool (%p, 0x%x) returning NULL\n", DPRINT1("EX: ExAllocatePool (%lu, 0x%x) returning NULL\n",
NumberOfBytes, NumberOfBytes,
OriginalType); OriginalType);
if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint(); if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint();

View file

@ -287,7 +287,7 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
MmSizeOfNonPagedPoolInBytes); MmSizeOfNonPagedPoolInBytes);
MmNonPagedPoolStart = (PVOID)PAGE_ALIGN(MmNonPagedPoolStart); MmNonPagedPoolStart = (PVOID)PAGE_ALIGN(MmNonPagedPoolStart);
NonPagedPoolExpansionVa = MmNonPagedPoolStart; NonPagedPoolExpansionVa = MmNonPagedPoolStart;
DPRINT("NP Pool has been tuned to: %d bytes and %d bytes\n", DPRINT("NP Pool has been tuned to: %lu bytes and %lu bytes\n",
MmSizeOfNonPagedPoolInBytes, MmMaximumNonPagedPoolInBytes); MmSizeOfNonPagedPoolInBytes, MmMaximumNonPagedPoolInBytes);
// //
@ -471,7 +471,7 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
MmNumberOfSystemPtes = MiAddressToPte(MmNonPagedPoolExpansionStart) - MmNumberOfSystemPtes = MiAddressToPte(MmNonPagedPoolExpansionStart) -
PointerPte; PointerPte;
MmNumberOfSystemPtes--; MmNumberOfSystemPtes--;
DPRINT("Final System PTE count: %d (%d bytes)\n", DPRINT("Final System PTE count: %lu (%lu bytes)\n",
MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE); MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
// //

View file

@ -2003,7 +2003,7 @@ MiDbgDumpMemoryDescriptors(VOID)
TotalPages += Md->PageCount; TotalPages += Md->PageCount;
} }
DPRINT1("Total: %08lX (%d MB)\n", (ULONG)TotalPages, (ULONG)(TotalPages * PAGE_SIZE) / 1024 / 1024); DPRINT1("Total: %08lX (%lu MB)\n", (ULONG)TotalPages, (ULONG)(TotalPages * PAGE_SIZE) / 1024 / 1024);
} }
BOOLEAN BOOLEAN
@ -2183,7 +2183,7 @@ MmArmInitSystem(IN ULONG Phase,
} }
} }
DPRINT("System PTE count has been tuned to %d (%d bytes)\n", DPRINT("System PTE count has been tuned to %lu (%lu bytes)\n",
MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE); MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
/* Check if no values are set for the heap limits */ /* Check if no values are set for the heap limits */

View file

@ -791,7 +791,7 @@ MiResolveTransitionFault(IN PVOID FaultingAddress,
PMMPFN Pfn1; PMMPFN Pfn1;
MMPTE TempPte; MMPTE TempPte;
PMMPTE PointerToPteForProtoPage; PMMPTE PointerToPteForProtoPage;
DPRINT1("Transition fault on 0x%p with PTE 0x%lx in process %s\n", FaultingAddress, PointerPte, CurrentProcess->ImageFileName); DPRINT1("Transition fault on 0x%p with PTE 0x%p in process %s\n", FaultingAddress, PointerPte, CurrentProcess->ImageFileName);
/* Windowss does this check */ /* Windowss does this check */
ASSERT(*InPageBlock == NULL); ASSERT(*InPageBlock == NULL);

View file

@ -212,7 +212,7 @@ MiUnlinkFreeOrZeroedPage(IN PMMPFN Entry)
{ {
/* FIXME: Should wake up the MPW and working set manager, if we had one */ /* FIXME: Should wake up the MPW and working set manager, if we had one */
DPRINT1("Running low on pages: %d remaining\n", MmAvailablePages); DPRINT1("Running low on pages: %lu remaining\n", MmAvailablePages);
/* Call RosMm and see if it can release any pages for us */ /* Call RosMm and see if it can release any pages for us */
MmRebalanceMemoryConsumers(); MmRebalanceMemoryConsumers();
@ -273,7 +273,7 @@ MiUnlinkPageFromList(IN PMMPFN Pfn)
if (--MmAvailablePages < MmMinimumFreePages) if (--MmAvailablePages < MmMinimumFreePages)
{ {
/* FIXME: Should wake up the MPW and working set manager, if we had one */ /* FIXME: Should wake up the MPW and working set manager, if we had one */
DPRINT1("Running low on pages: %d remaining\n", MmAvailablePages); DPRINT1("Running low on pages: %lu remaining\n", MmAvailablePages);
/* Call RosMm and see if it can release any pages for us */ /* Call RosMm and see if it can release any pages for us */
MmRebalanceMemoryConsumers(); MmRebalanceMemoryConsumers();
@ -459,7 +459,7 @@ MiRemovePageByColor(IN PFN_NUMBER PageIndex,
{ {
/* FIXME: Should wake up the MPW and working set manager, if we had one */ /* FIXME: Should wake up the MPW and working set manager, if we had one */
DPRINT1("Running low on pages: %d remaining\n", MmAvailablePages); DPRINT1("Running low on pages: %lu remaining\n", MmAvailablePages);
/* Call RosMm and see if it can release any pages for us */ /* Call RosMm and see if it can release any pages for us */
MmRebalanceMemoryConsumers(); MmRebalanceMemoryConsumers();
@ -1184,7 +1184,7 @@ MiAllocatePfn(IN PMMPTE PointerPte,
/* Check if we're running low on pages */ /* Check if we're running low on pages */
if (MmAvailablePages < 128) if (MmAvailablePages < 128)
{ {
DPRINT1("Warning, running low on memory: %d pages left\n", MmAvailablePages); DPRINT1("Warning, running low on memory: %lu pages left\n", MmAvailablePages);
//MiEnsureAvailablePageOrWait(NULL, OldIrql); //MiEnsureAvailablePageOrWait(NULL, OldIrql);

View file

@ -482,7 +482,7 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType,
// Get the page bit count // Get the page bit count
// //
i = ((SizeInPages - 1) / PTE_COUNT) + 1; i = ((SizeInPages - 1) / PTE_COUNT) + 1;
DPRINT1("Paged pool expansion: %d %x\n", i, SizeInPages); DPRINT1("Paged pool expansion: %lu %x\n", i, SizeInPages);
// //
// Check if there is enougn paged pool expansion space left // Check if there is enougn paged pool expansion space left

View file

@ -1576,7 +1576,7 @@ MiReleaseProcessReferenceToSessionDataPage(IN PMM_SESSION_SPACE SessionGlobal)
/* Get the session ID */ /* Get the session ID */
SessionId = SessionGlobal->SessionId; SessionId = SessionGlobal->SessionId;
DPRINT1("Last process in sessino %d going down!!!\n", SessionId); DPRINT1("Last process in sessino %lu going down!!!\n", SessionId);
/* Free the session page tables */ /* Free the session page tables */
#ifndef _M_AMD64 #ifndef _M_AMD64
@ -1986,7 +1986,7 @@ MiSessionCreateInternal(OUT PULONG SessionId)
MmSessionSpace->PageTables[PointerPde - MiAddressToPde(MmSessionBase)] = *PointerPde; MmSessionSpace->PageTables[PointerPde - MiAddressToPde(MmSessionBase)] = *PointerPde;
#endif #endif
InitializeListHead(&MmSessionSpace->ImageList); InitializeListHead(&MmSessionSpace->ImageList);
DPRINT1("Session %d is ready to go: 0x%p 0x%p, %lx 0x%p\n", DPRINT1("Session %lu is ready to go: 0x%p 0x%p, %lx 0x%p\n",
*SessionId, MmSessionSpace, SessionGlobal, SessionPageDirIndex, PageTables); *SessionId, MmSessionSpace, SessionGlobal, SessionPageDirIndex, PageTables);
/* Initialize session pool */ /* Initialize session pool */

View file

@ -503,7 +503,7 @@ MiTestSpecialPool()
{ {
ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER)); ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER));
p1 = MmAllocateSpecialPool(ByteSize, 'TEST', PoolType, 0); p1 = MmAllocateSpecialPool(ByteSize, 'TEST', PoolType, 0);
DPRINT1("p1 %p size %d\n", p1, ByteSize); DPRINT1("p1 %p size %lu\n", p1, ByteSize);
MmFreeSpecialPool(p1); MmFreeSpecialPool(p1);
} }
@ -512,7 +512,7 @@ MiTestSpecialPool()
{ {
ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER)); ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER));
p2[i] = MmAllocateSpecialPool(ByteSize, 'TEST', PoolType, 0); p2[i] = MmAllocateSpecialPool(ByteSize, 'TEST', PoolType, 0);
DPRINT1("p2[%d] %p size %d\n", i, p1, ByteSize); DPRINT1("p2[%lu] %p size %lu\n", i, p1, ByteSize);
} }
for (i=0; i<100; i++) for (i=0; i<100; i++)
{ {

View file

@ -172,7 +172,7 @@ MiTrimMemoryConsumer(ULONG Consumer, ULONG InitialTarget)
/* Now swap the pages out */ /* Now swap the pages out */
Status = MiMemoryConsumers[Consumer].Trim(Target, 0, &NrFreedPages); Status = MiMemoryConsumers[Consumer].Trim(Target, 0, &NrFreedPages);
DPRINT("Trimming consumer %d: Freed %d pages with a target of %d pages\n", Consumer, NrFreedPages, Target); DPRINT("Trimming consumer %lu: Freed %lu pages with a target of %lu pages\n", Consumer, NrFreedPages, Target);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {

View file

@ -167,7 +167,7 @@ MiAllocatePagesForMdl(IN PHYSICAL_ADDRESS LowAddress,
PPHYSICAL_PAGE Pfn1; PPHYSICAL_PAGE Pfn1;
INT LookForZeroedPages; INT LookForZeroedPages;
ASSERT(KeGetCurrentIrql() <= APC_LEVEL); ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
DPRINT1("ARM3-DEBUG: Being called with %I64x %I64x %I64x %lx %d %d\n", LowAddress, HighAddress, SkipBytes, TotalBytes, CacheAttribute, MdlFlags); DPRINT1("ARM3-DEBUG: Being called with %I64x %I64x %I64x %lx %d %lu\n", LowAddress, HighAddress, SkipBytes, TotalBytes, CacheAttribute, MdlFlags);
// //
// Convert the low address into a PFN // Convert the low address into a PFN

View file

@ -445,7 +445,7 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
ULONG Pte; ULONG Pte;
PULONG Pt; PULONG Pt;
DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n", DPRINT("MmDeleteVirtualMapping(%p, %p, %u, %p, %p)\n",
Process, Address, FreePage, WasDirty, Page); Process, Address, FreePage, WasDirty, Page);
Pt = MmGetPageTableForProcess(Process, Address, FALSE); Pt = MmGetPageTableForProcess(Process, Address, FALSE);
@ -792,7 +792,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
ULONG oldPdeOffset, PdeOffset; ULONG oldPdeOffset, PdeOffset;
PULONG Pt = NULL; PULONG Pt = NULL;
ULONG Pte; ULONG Pte;
DPRINT("MmCreateVirtualMappingUnsafe(%x, %x, %x, %x (%x), %d)\n", DPRINT("MmCreateVirtualMappingUnsafe(%p, %p, %lu, %p (%x), %lu)\n",
Process, Address, flProtect, Pages, *Pages, PageCount); Process, Address, flProtect, Pages, *Pages, PageCount);
ASSERT(((ULONG_PTR)Address % PAGE_SIZE) == 0); ASSERT(((ULONG_PTR)Address % PAGE_SIZE) == 0);
@ -847,7 +847,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
if (!(Attributes & PA_PRESENT) && Pages[i] != 0) if (!(Attributes & PA_PRESENT) && Pages[i] != 0)
{ {
DPRINT1("Setting physical address but not allowing access at address " DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n", "0x%p with attributes %x/%x.\n",
Addr, Attributes, flProtect); Addr, Attributes, flProtect);
KeBugCheck(MEMORY_MANAGEMENT); KeBugCheck(MEMORY_MANAGEMENT);
} }
@ -969,7 +969,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
PULONG Pt; PULONG Pt;
ULONG Pte; ULONG Pte;
DPRINT("MmSetPageProtect(Process %x Address %x flProtect %x)\n", DPRINT("MmSetPageProtect(Process %p Address %p flProtect %x)\n",
Process, Address, flProtect); Process, Address, flProtect);
Attributes = ProtectToPTE(flProtect); Attributes = ProtectToPTE(flProtect);
@ -1016,7 +1016,7 @@ MmGetPhysicalAddress(PVOID vaddr)
PHYSICAL_ADDRESS p; PHYSICAL_ADDRESS p;
ULONG Pte; ULONG Pte;
DPRINT("MmGetPhysicalAddress(vaddr %x)\n", vaddr); DPRINT("MmGetPhysicalAddress(vaddr %p)\n", vaddr);
Pte = MmGetPageEntryForProcess(NULL, vaddr); Pte = MmGetPageEntryForProcess(NULL, vaddr);
if (Pte != 0 && (Pte & PA_PRESENT)) if (Pte != 0 && (Pte & PA_PRESENT))
{ {

View file

@ -1132,7 +1132,7 @@ MmDeleteProcessAddressSpace(PEPROCESS Process)
PVOID Address; PVOID Address;
PMEMORY_AREA MemoryArea; PMEMORY_AREA MemoryArea;
DPRINT("MmDeleteProcessAddressSpace(Process %x (%s))\n", Process, DPRINT("MmDeleteProcessAddressSpace(Process %p (%s))\n", Process,
Process->ImageFileName); Process->ImageFileName);
#ifndef _M_AMD64 #ifndef _M_AMD64

View file

@ -32,7 +32,7 @@ MmpAccessFault(KPROCESSOR_MODE Mode,
if (KeGetCurrentIrql() >= DISPATCH_LEVEL) if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
{ {
DPRINT1("Page fault at high IRQL was %d\n", KeGetCurrentIrql()); DPRINT1("Page fault at high IRQL was %u\n", KeGetCurrentIrql());
return(STATUS_UNSUCCESSFUL); return(STATUS_UNSUCCESSFUL);
} }
@ -119,7 +119,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode,
if (KeGetCurrentIrql() >= DISPATCH_LEVEL) if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
{ {
DPRINT1("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address); DPRINT1("Page fault at high IRQL was %u, address %x\n", KeGetCurrentIrql(), Address);
return(STATUS_UNSUCCESSFUL); return(STATUS_UNSUCCESSFUL);
} }

View file

@ -647,7 +647,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
* bytes) to the physical location of cluster 3042 then. */ * bytes) to the physical location of cluster 3042 then. */
if (BytesPerAllocationUnit % PAGE_SIZE) if (BytesPerAllocationUnit % PAGE_SIZE)
{ {
DPRINT1("BytesPerAllocationUnit %d is not a multiple of PAGE_SIZE %d\n", DPRINT1("BytesPerAllocationUnit %lu is not a multiple of PAGE_SIZE %d\n",
BytesPerAllocationUnit, PAGE_SIZE); BytesPerAllocationUnit, PAGE_SIZE);
ZwClose(FileHandle); ZwClose(FileHandle);
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
@ -784,7 +784,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
ZwClose(FileHandle); ZwClose(FileHandle);
return(STATUS_NO_MEMORY); return(STATUS_NO_MEMORY);
} }
DPRINT("ExtentCount: %d\n", ExtentCount); DPRINT("ExtentCount: %lu\n", ExtentCount);
Size = sizeof(RETRIEVAL_POINTERS_BUFFER) + ExtentCount * 2 * sizeof(LARGE_INTEGER); Size = sizeof(RETRIEVAL_POINTERS_BUFFER) + ExtentCount * 2 * sizeof(LARGE_INTEGER);
PagingFile->RetrievalPointers = ExAllocatePool(NonPagedPool, Size); PagingFile->RetrievalPointers = ExAllocatePool(NonPagedPool, Size);
if (PagingFile->RetrievalPointers == NULL) if (PagingFile->RetrievalPointers == NULL)

View file

@ -60,7 +60,7 @@
#undef MmSetPageEntrySectionSegment #undef MmSetPageEntrySectionSegment
#define MmSetPageEntrySectionSegment(S,O,E) do { \ #define MmSetPageEntrySectionSegment(S,O,E) do { \
DPRINT("SetPageEntrySectionSegment(old,%x,%x,%x)\n",(S),(O)->LowPart,E); \ DPRINT("SetPageEntrySectionSegment(old,%p,%x,%x)\n",(S),(O)->LowPart,E); \
_MmSetPageEntrySectionSegment((S),(O),(E),__FILE__,__LINE__); \ _MmSetPageEntrySectionSegment((S),(O),(E),__FILE__,__LINE__); \
} while (0) } while (0)
@ -805,7 +805,7 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject)
{ {
if (SectionSegments[i].ReferenceCount != 0) if (SectionSegments[i].ReferenceCount != 0)
{ {
DPRINT1("Image segment %d still referenced (was %d)\n", i, DPRINT1("Image segment %lu still referenced (was %lu)\n", i,
SectionSegments[i].ReferenceCount); SectionSegments[i].ReferenceCount);
KeBugCheck(MEMORY_MANAGEMENT); KeBugCheck(MEMORY_MANAGEMENT);
} }
@ -1084,7 +1084,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
ASSERT(Bcb); ASSERT(Bcb);
DPRINT("%S %x\n", FileObject->FileName.Buffer, FileOffset); DPRINT("%S %I64x\n", FileObject->FileName.Buffer, FileOffset);
/* /*
* If the file system is letting us go directly to the cache and the * If the file system is letting us go directly to the cache and the
@ -1345,7 +1345,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
MmUnlockAddressSpace(AddressSpace); MmUnlockAddressSpace(AddressSpace);
MiWaitForPageEvent(NULL, NULL); MiWaitForPageEvent(NULL, NULL);
MmLockAddressSpace(AddressSpace); MmLockAddressSpace(AddressSpace);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_MM_RESTART_OPERATION); return(STATUS_MM_RESTART_OPERATION);
} }
@ -1429,7 +1429,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
* Finish the operation * Finish the operation
*/ */
MiSetPageEvent(Process, Address); MiSetPageEvent(Process, Address);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
@ -1459,7 +1459,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
* Cleanup and release locks * Cleanup and release locks
*/ */
MiSetPageEvent(Process, Address); MiSetPageEvent(Process, Address);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
@ -1517,7 +1517,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
*/ */
MmLockAddressSpace(AddressSpace); MmLockAddressSpace(AddressSpace);
MiSetPageEvent(Process, Address); MiSetPageEvent(Process, Address);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(Status); return(Status);
} }
@ -1548,7 +1548,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
MmInsertRmap(Page, Process, Address); MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address); MiSetPageEvent(Process, Address);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
else if (IS_SWAP_FROM_SSE(Entry)) else if (IS_SWAP_FROM_SSE(Entry))
@ -1619,7 +1619,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
} }
MmInsertRmap(Page, Process, Address); MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address); MiSetPageEvent(Process, Address);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
else else
@ -1646,7 +1646,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
} }
MmInsertRmap(Page, Process, Address); MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address); MiSetPageEvent(Process, Address);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
} }
@ -1669,14 +1669,14 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace); PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
SWAPENTRY SwapEntry; SWAPENTRY SwapEntry;
DPRINT("MmAccessFaultSectionView(%x, %x, %x, %x)\n", AddressSpace, MemoryArea, Address); DPRINT("MmAccessFaultSectionView(%p, %p, %p)\n", AddressSpace, MemoryArea, Address);
/* /*
* Check if the page has already been set readwrite * Check if the page has already been set readwrite
*/ */
if (MmGetPageProtect(Process, Address) & PAGE_READWRITE) if (MmGetPageProtect(Process, Address) & PAGE_READWRITE)
{ {
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
@ -1710,7 +1710,7 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
(Region->Protect == PAGE_READWRITE || (Region->Protect == PAGE_READWRITE ||
Region->Protect == PAGE_EXECUTE_READWRITE))) Region->Protect == PAGE_EXECUTE_READWRITE)))
{ {
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_ACCESS_VIOLATION); return(STATUS_ACCESS_VIOLATION);
} }
@ -1743,7 +1743,7 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
* Restart the operation * Restart the operation
*/ */
MmLockAddressSpace(AddressSpace); MmLockAddressSpace(AddressSpace);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_MM_RESTART_OPERATION); return(STATUS_MM_RESTART_OPERATION);
} }
@ -1802,7 +1802,7 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
MmUnlockSectionSegment(Segment); MmUnlockSectionSegment(Segment);
MiSetPageEvent(Process, Address); MiSetPageEvent(Process, Address);
DPRINT("Address 0x%.8X\n", Address); DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
@ -1917,8 +1917,8 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
*/ */
if (Context.Section->AllocationAttributes & SEC_PHYSICALMEMORY) if (Context.Section->AllocationAttributes & SEC_PHYSICALMEMORY)
{ {
DPRINT1("Trying to page out from physical memory section address 0x%X " DPRINT1("Trying to page out from physical memory section address 0x%p "
"process %d\n", Address, "process %p\n", Address,
Process ? Process->UniqueProcessId : 0); Process ? Process->UniqueProcessId : 0);
KeBugCheck(MEMORY_MANAGEMENT); KeBugCheck(MEMORY_MANAGEMENT);
} }
@ -1928,7 +1928,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
*/ */
if (!MmIsPagePresent(Process, Address)) if (!MmIsPagePresent(Process, Address))
{ {
DPRINT1("Trying to page out not-present page at (%d,0x%.8X).\n", DPRINT1("Trying to page out not-present page at (%p,0x%p).\n",
Process ? Process->UniqueProcessId : 0, Address); Process ? Process->UniqueProcessId : 0, Address);
KeBugCheck(MEMORY_MANAGEMENT); KeBugCheck(MEMORY_MANAGEMENT);
} }
@ -1940,7 +1940,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
*/ */
if (MmGetReferenceCountPage(Page) != 1) if (MmGetReferenceCountPage(Page) != 1)
{ {
DPRINT("Cannot page out locked section page: 0x%p (RefCount: %d)\n", DPRINT("Cannot page out locked section page: 0x%lu (RefCount: %lu)\n",
Page, MmGetReferenceCountPage(Page)); Page, MmGetReferenceCountPage(Page));
MmSetPageEntrySectionSegment(Context.Segment, &Context.Offset, Entry); MmSetPageEntrySectionSegment(Context.Segment, &Context.Offset, Entry);
MmUnlockSectionSegment(Context.Segment); MmUnlockSectionSegment(Context.Segment);
@ -2014,7 +2014,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
{ {
if (Context.Private) if (Context.Private)
{ {
DPRINT1("Found a %s private page (address %x) in a pagefile segment.\n", DPRINT1("Found a %s private page (address %p) in a pagefile segment.\n",
Context.WasDirty ? "dirty" : "clean", Address); Context.WasDirty ? "dirty" : "clean", Address);
KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address, 0); KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address, 0);
} }
@ -2033,7 +2033,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
{ {
if (Context.Private) if (Context.Private)
{ {
DPRINT1("Found a %s private page (address %x) in a shared section segment.\n", DPRINT1("Found a %s private page (address %p) in a shared section segment.\n",
Context.WasDirty ? "dirty" : "clean", Address); Context.WasDirty ? "dirty" : "clean", Address);
KeBugCheckEx(MEMORY_MANAGEMENT, Page, (ULONG_PTR)Process, (ULONG_PTR)Address, 0); KeBugCheckEx(MEMORY_MANAGEMENT, Page, (ULONG_PTR)Process, (ULONG_PTR)Address, 0);
} }
@ -2055,7 +2055,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
{ {
if (SwapEntry != 0) if (SwapEntry != 0)
{ {
DPRINT1("Found a swapentry for a non private and direct mapped page (address %x)\n", DPRINT1("Found a swapentry for a non private and direct mapped page (address %p)\n",
Address); Address);
KeBugCheckEx(MEMORY_MANAGEMENT, STATUS_UNSUCCESSFUL, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address); KeBugCheckEx(MEMORY_MANAGEMENT, STATUS_UNSUCCESSFUL, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address);
} }
@ -2078,7 +2078,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
{ {
if (SwapEntry != 0) if (SwapEntry != 0)
{ {
DPRINT1("Found a swap entry for a non dirty, non private and not direct mapped page (address %x)\n", DPRINT1("Found a swap entry for a non dirty, non private and not direct mapped page (address %p)\n",
Address); Address);
KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, Page, (ULONG_PTR)Process, (ULONG_PTR)Address); KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, Page, (ULONG_PTR)Process, (ULONG_PTR)Address);
} }
@ -2312,8 +2312,8 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace,
*/ */
if (Section->AllocationAttributes & SEC_PHYSICALMEMORY) if (Section->AllocationAttributes & SEC_PHYSICALMEMORY)
{ {
DPRINT1("Trying to write back page from physical memory mapped at %X " DPRINT1("Trying to write back page from physical memory mapped at %p "
"process %d\n", Address, "process %p\n", Address,
Process ? Process->UniqueProcessId : 0); Process ? Process->UniqueProcessId : 0);
KeBugCheck(MEMORY_MANAGEMENT); KeBugCheck(MEMORY_MANAGEMENT);
} }
@ -2324,7 +2324,7 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace,
Entry = MmGetPageEntrySectionSegment(Segment, &Offset); Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
if (!MmIsPagePresent(Process, Address)) if (!MmIsPagePresent(Process, Address))
{ {
DPRINT1("Trying to page out not-present page at (%d,0x%.8X).\n", DPRINT1("Trying to page out not-present page at (%p,0x%p).\n",
Process ? Process->UniqueProcessId : 0, Address); Process ? Process->UniqueProcessId : 0, Address);
KeBugCheck(MEMORY_MANAGEMENT); KeBugCheck(MEMORY_MANAGEMENT);
} }
@ -2705,8 +2705,7 @@ MmpCloseSection(IN PEPROCESS Process OPTIONAL,
IN ULONG ProcessHandleCount, IN ULONG ProcessHandleCount,
IN ULONG SystemHandleCount) IN ULONG SystemHandleCount)
{ {
DPRINT("MmpCloseSection(OB %x, HC %d)\n", DPRINT("MmpCloseSection(OB %p, HC %lu)\n", Object, ProcessHandleCount);
Object, ProcessHandleCount);
} }
NTSTATUS NTSTATUS
@ -3937,7 +3936,7 @@ MmMapViewOfSegment(PMMSUPPORT AddressSpace,
BoundaryAddressMultiple); BoundaryAddressMultiple);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("Mapping between 0x%.8X and 0x%.8X failed (%X).\n", DPRINT1("Mapping between 0x%p and 0x%p failed (%X).\n",
(*BaseAddress), (char*)(*BaseAddress) + ViewSize, Status); (*BaseAddress), (char*)(*BaseAddress) + ViewSize, Status);
return(Status); return(Status);
} }
@ -4123,7 +4122,7 @@ MiRosUnmapViewOfSection(IN PEPROCESS Process,
PROS_SECTION_OBJECT Section; PROS_SECTION_OBJECT Section;
PVOID ImageBaseAddress = 0; PVOID ImageBaseAddress = 0;
DPRINT("Opening memory area Process %x BaseAddress %x\n", DPRINT("Opening memory area Process %p BaseAddress %p\n",
Process, BaseAddress); Process, BaseAddress);
ASSERT(Process); ASSERT(Process);

View file

@ -60,7 +60,7 @@ ObpInsertEntryDirectory(IN POBJECT_DIRECTORY Parent,
(Parent != Context->Directory)) (Parent != Context->Directory))
{ {
/* Invalid context */ /* Invalid context */
DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %ld\n", DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %u\n",
Context, Context->DirectoryLocked); Context, Context->DirectoryLocked);
ASSERT(FALSE); ASSERT(FALSE);
return FALSE; return FALSE;

View file

@ -683,7 +683,7 @@ ObpCloseHandleTableEntry(IN PHANDLE_TABLE HandleTable,
Body = &ObjectHeader->Body; Body = &ObjectHeader->Body;
GrantedAccess = HandleEntry->GrantedAccess; GrantedAccess = HandleEntry->GrantedAccess;
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Closing handle: %lx for %p. HC PC %lx %lx\n", "%s - Closing handle: %p for %p. HC PC %lx %lx\n",
__FUNCTION__, __FUNCTION__,
Handle, Handle,
Body, Body,
@ -753,7 +753,7 @@ ObpCloseHandleTableEntry(IN PHANDLE_TABLE HandleTable,
/* Return to caller */ /* Return to caller */
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Closed handle: %lx for %p.\n", "%s - Closed handle: %p for %p.\n",
__FUNCTION__, __FUNCTION__,
Handle, Handle,
Body); Body);
@ -1399,7 +1399,7 @@ ObpCreateUnnamedHandle(IN PVOID Object,
/* Trace and return */ /* Trace and return */
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Returning Handle: %lx HC PC %lx %lx\n", "%s - Returning Handle: %p HC PC %lx %lx\n",
__FUNCTION__, __FUNCTION__,
Handle, Handle,
ObjectHeader->HandleCount, ObjectHeader->HandleCount,
@ -1645,7 +1645,7 @@ ObpCreateHandle(IN OB_OPEN_REASON OpenReason,
/* Trace and return */ /* Trace and return */
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Returning Handle: %lx HC PC %lx %lx\n", "%s - Returning Handle: %p HC PC %lx %lx\n",
__FUNCTION__, __FUNCTION__,
Handle, Handle,
ObjectHeader->HandleCount, ObjectHeader->HandleCount,
@ -1708,7 +1708,7 @@ ObpCloseHandle(IN HANDLE Handle,
PEPROCESS Process = PsGetCurrentProcess(); PEPROCESS Process = PsGetCurrentProcess();
PAGED_CODE(); PAGED_CODE();
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Closing handle: %lx\n", __FUNCTION__, Handle); "%s - Closing handle: %p\n", __FUNCTION__, Handle);
if (AccessMode == KernelMode && Handle == (HANDLE)-1) if (AccessMode == KernelMode && Handle == (HANDLE)-1)
return STATUS_INVALID_HANDLE; return STATUS_INVALID_HANDLE;
@ -1803,7 +1803,7 @@ ObpCloseHandle(IN HANDLE Handle,
/* Return status */ /* Return status */
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Closed handle: %lx S: %lx\n", "%s - Closed handle: %p S: %lx\n",
__FUNCTION__, Handle, Status); __FUNCTION__, Handle, Status);
return Status; return Status;
} }
@ -2141,7 +2141,7 @@ ObDuplicateObject(IN PEPROCESS SourceProcess,
ULONG AuditMask; ULONG AuditMask;
PAGED_CODE(); PAGED_CODE();
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Duplicating handle: %lx for %p into %p\n", "%s - Duplicating handle: %p for %p into %p\n",
__FUNCTION__, __FUNCTION__,
SourceHandle, SourceHandle,
SourceProcess, SourceProcess,
@ -2374,7 +2374,7 @@ ObDuplicateObject(IN PEPROCESS SourceProcess,
/* Return status */ /* Return status */
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Duplicated handle: %lx for %p into %p. Source: %p HC PC %lx %lx\n", "%s - Duplicated handle: %p for %p into %p. Source: %p HC PC %lx %lx\n",
__FUNCTION__, __FUNCTION__,
NewHandle, NewHandle,
SourceProcess, SourceProcess,
@ -2851,7 +2851,7 @@ ObInsertObject(IN PVOID Object,
if (!(ObjectHeader->Flags & OB_FLAG_CREATE_INFO)) if (!(ObjectHeader->Flags & OB_FLAG_CREATE_INFO))
{ {
/* Display warning and break into debugger */ /* Display warning and break into debugger */
DPRINT1("OB: Attempting to insert existing object %08x\n", Object); DPRINT1("OB: Attempting to insert existing object %p\n", Object);
DbgBreakPoint(); DbgBreakPoint();
/* Allow debugger to continue */ /* Allow debugger to continue */
@ -3234,7 +3234,7 @@ NtDuplicateObject(IN HANDLE SourceProcessHandle,
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status; NTSTATUS Status;
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Duplicating handle: %lx for %lx into %lx.\n", "%s - Duplicating handle: %p for %p into %p.\n",
__FUNCTION__, __FUNCTION__,
SourceHandle, SourceHandle,
SourceProcessHandle, SourceProcessHandle,
@ -3324,7 +3324,7 @@ NtDuplicateObject(IN HANDLE SourceProcessHandle,
/* Dereference the processes */ /* Dereference the processes */
OBTRACE(OB_HANDLE_DEBUG, OBTRACE(OB_HANDLE_DEBUG,
"%s - Duplicated handle: %lx into %lx S %lx\n", "%s - Duplicated handle: %p into %p S %lx\n",
__FUNCTION__, __FUNCTION__,
hTarget, hTarget,
TargetProcessHandle, TargetProcessHandle,

View file

@ -285,7 +285,7 @@ ObpCreateSymbolicLinkName(IN POBJECT_SYMBOLIC_LINK SymbolicLink)
DriveType = DOSDEVICE_DRIVE_REMOTE; DriveType = DOSDEVICE_DRIVE_REMOTE;
break; break;
default: default:
DPRINT1("Device Type %ld for %wZ is not known or unhandled\n", DPRINT1("Device Type %lu for %wZ is not known or unhandled\n",
((PDEVICE_OBJECT)Object)->DeviceType, ((PDEVICE_OBJECT)Object)->DeviceType,
&SymbolicLink->LinkTarget); &SymbolicLink->LinkTarget);
DriveType = DOSDEVICE_DRIVE_UNKNOWN; DriveType = DOSDEVICE_DRIVE_UNKNOWN;

View file

@ -132,7 +132,7 @@ PopGracefulShutdown(IN PVOID Context)
if ((Process != PsInitialSystemProcess) && (Process != PsIdleProcess)) if ((Process != PsInitialSystemProcess) && (Process != PsIdleProcess))
{ {
/* Print it */ /* Print it */
DPRINT1("%15s is still RUNNING (%lx)\n", Process->ImageFileName, Process->UniqueProcessId); DPRINT1("%15s is still RUNNING (%p)\n", Process->ImageFileName, Process->UniqueProcessId);
} }
/* Get the next process */ /* Get the next process */

View file

@ -205,7 +205,7 @@ PopFlushVolumeWorker(IN PVOID Context)
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))
{ {
/* Flush it and close it */ /* Flush it and close it */
DPRINT1("Sending flush to: %lx\n", VolumeHandle); DPRINT1("Sending flush to: %p\n", VolumeHandle);
ZwFlushBuffersFile(VolumeHandle, &IoStatusBlock); ZwFlushBuffersFile(VolumeHandle, &IoStatusBlock);
ZwClose(VolumeHandle); ZwClose(VolumeHandle);
} }

View file

@ -679,8 +679,8 @@ NtPowerInformation(IN POWER_INFORMATION_LEVEL PowerInformationLevel,
PAGED_CODE(); PAGED_CODE();
DPRINT("NtPowerInformation(PowerInformationLevel 0x%x, InputBuffer 0x%x, " DPRINT("NtPowerInformation(PowerInformationLevel 0x%x, InputBuffer 0x%p, "
"InputBufferLength 0x%x, OutputBuffer 0x%x, OutputBufferLength 0x%x)\n", "InputBufferLength 0x%x, OutputBuffer 0x%p, OutputBufferLength 0x%x)\n",
PowerInformationLevel, PowerInformationLevel,
InputBuffer, InputBufferLength, InputBuffer, InputBufferLength,
OutputBuffer, OutputBufferLength); OutputBuffer, OutputBufferLength);
@ -914,7 +914,7 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
#endif #endif
/* Flush all volumes and the registry */ /* Flush all volumes and the registry */
DPRINT1("Flushing volumes, cache flushed %d pages\n", Dummy); DPRINT1("Flushing volumes, cache flushed %lu pages\n", Dummy);
PopFlushVolumes(PopAction.Shutdown); PopFlushVolumes(PopAction.Shutdown);
/* Set IRP for drivers */ /* Set IRP for drivers */

View file

@ -46,7 +46,7 @@ PspDumpThreads(BOOLEAN IncludeSystem)
nThreads++; nThreads++;
/* Print the Info */ /* Print the Info */
DbgPrint("State %d Affinity %08x Priority %d PID.TID %d.%d Name %.8s Stack: \n", DbgPrint("State %u Affinity %08x Priority %d PID.TID %d.%d Name %.8s Stack: \n",
Thread->Tcb.State, Thread->Tcb.State,
Thread->Tcb.Affinity, Thread->Tcb.Affinity,
Thread->Tcb.Priority, Thread->Tcb.Priority,
@ -64,7 +64,7 @@ PspDumpThreads(BOOLEAN IncludeSystem)
PULONG Ebp = (PULONG)Esp[4]; PULONG Ebp = (PULONG)Esp[4];
/* Print EBP */ /* Print EBP */
DbgPrint("Ebp 0x%.8X\n", Ebp); DbgPrint("Ebp %p\n", Ebp);
/* Walk it */ /* Walk it */
while(Ebp != 0 && Ebp >= (PULONG)Thread->Tcb.StackLimit) while(Ebp != 0 && Ebp >= (PULONG)Thread->Tcb.StackLimit)

View file

@ -86,7 +86,7 @@ PspTerminateProcess(IN PEPROCESS Process,
NTSTATUS Status = STATUS_NOTHING_TO_TERMINATE; NTSTATUS Status = STATUS_NOTHING_TO_TERMINATE;
PAGED_CODE(); PAGED_CODE();
PSTRACE(PS_KILL_DEBUG, PSTRACE(PS_KILL_DEBUG,
"Process: %p ExitStatus: %p\n", Process, ExitStatus); "Process: %p ExitStatus: %d\n", Process, ExitStatus);
PSREFTRACE(Process); PSREFTRACE(Process);
/* Check if this is a Critical Process */ /* Check if this is a Critical Process */
@ -461,7 +461,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
PKAPC Apc; PKAPC Apc;
PTOKEN PrimaryToken; PTOKEN PrimaryToken;
PAGED_CODE(); PAGED_CODE();
PSTRACE(PS_KILL_DEBUG, "ExitStatus: %p\n", ExitStatus); PSTRACE(PS_KILL_DEBUG, "ExitStatus: %d\n", ExitStatus);
/* Get the Current Thread and Process */ /* Get the Current Thread and Process */
Thread = PsGetCurrentThread(); Thread = PsGetCurrentThread();
@ -991,7 +991,7 @@ PspTerminateThreadByPointer(IN PETHREAD Thread,
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
ULONG Flags; ULONG Flags;
PAGED_CODE(); PAGED_CODE();
PSTRACE(PS_KILL_DEBUG, "Thread: %p ExitStatus: %p\n", Thread, ExitStatus); PSTRACE(PS_KILL_DEBUG, "Thread: %p ExitStatus: %d\n", Thread, ExitStatus);
PSREFTRACE(Thread); PSREFTRACE(Thread);
/* Check if this is a Critical Thread, and Bugcheck */ /* Check if this is a Critical Thread, and Bugcheck */
@ -1076,7 +1076,7 @@ PspExitProcess(IN BOOLEAN LastThread,
ULONG Actual; ULONG Actual;
PAGED_CODE(); PAGED_CODE();
PSTRACE(PS_KILL_DEBUG, PSTRACE(PS_KILL_DEBUG,
"LastThread: %p Process: %p\n", LastThread, Process); "LastThread: %u Process: %p\n", LastThread, Process);
PSREFTRACE(Process); PSREFTRACE(Process);
/* Set Process Exit flag */ /* Set Process Exit flag */
@ -1165,7 +1165,7 @@ NtTerminateProcess(IN HANDLE ProcessHandle OPTIONAL,
BOOLEAN KillByHandle; BOOLEAN KillByHandle;
PAGED_CODE(); PAGED_CODE();
PSTRACE(PS_KILL_DEBUG, PSTRACE(PS_KILL_DEBUG,
"ProcessHandle: %p ExitStatus: %p\n", ProcessHandle, ExitStatus); "ProcessHandle: %p ExitStatus: %d\n", ProcessHandle, ExitStatus);
/* Were we passed a process handle? */ /* Were we passed a process handle? */
if (ProcessHandle) if (ProcessHandle)
@ -1282,7 +1282,7 @@ NtTerminateThread(IN HANDLE ThreadHandle,
NTSTATUS Status; NTSTATUS Status;
PAGED_CODE(); PAGED_CODE();
PSTRACE(PS_KILL_DEBUG, PSTRACE(PS_KILL_DEBUG,
"ThreadHandle: %p ExitStatus: %p\n", ThreadHandle, ExitStatus); "ThreadHandle: %p ExitStatus: %d\n", ThreadHandle, ExitStatus);
/* Handle the special NULL case */ /* Handle the special NULL case */
if (!ThreadHandle) if (!ThreadHandle)

View file

@ -229,7 +229,7 @@ CHECK_PAGED_CODE_RTL(char *file, int line)
{ {
if(KeGetCurrentIrql() > APC_LEVEL) if(KeGetCurrentIrql() > APC_LEVEL)
{ {
DbgPrint("%s:%i: Pagable code called at IRQL > APC_LEVEL (%d)\n", file, line, KeGetCurrentIrql()); DbgPrint("%s:%i: Pagable code called at IRQL > APC_LEVEL (%u)\n", file, line, KeGetCurrentIrql());
ASSERT(FALSE); ASSERT(FALSE);
} }
} }

View file

@ -1316,7 +1316,7 @@ SeAssignSecurity(PSECURITY_DESCRIPTOR _ParentDescriptor OPTIONAL,
Length = sizeof(SECURITY_DESCRIPTOR_RELATIVE) + Length = sizeof(SECURITY_DESCRIPTOR_RELATIVE) +
OwnerLength + GroupLength + DaclLength + SaclLength; OwnerLength + GroupLength + DaclLength + SaclLength;
DPRINT("L: sizeof(SECURITY_DESCRIPTOR) %d OwnerLength %d GroupLength %d DaclLength %d SaclLength %d\n", DPRINT("L: sizeof(SECURITY_DESCRIPTOR) %u OwnerLength %lu GroupLength %lu DaclLength %lu SaclLength %lu\n",
sizeof(SECURITY_DESCRIPTOR), sizeof(SECURITY_DESCRIPTOR),
OwnerLength, OwnerLength,
GroupLength, GroupLength,
@ -1357,11 +1357,11 @@ SeAssignSecurity(PSECURITY_DESCRIPTOR _ParentDescriptor OPTIONAL,
RtlCopyMemory((PUCHAR)Descriptor + Current, Owner, OwnerLength); RtlCopyMemory((PUCHAR)Descriptor + Current, Owner, OwnerLength);
Descriptor->Owner = Current; Descriptor->Owner = Current;
Current += OwnerLength; Current += OwnerLength;
DPRINT("Owner of %x at %x\n", Descriptor, Descriptor->Owner); DPRINT("Owner of %p at %x\n", Descriptor, Descriptor->Owner);
} }
else else
{ {
DPRINT("Owner of %x is zero length\n", Descriptor); DPRINT("Owner of %p is zero length\n", Descriptor);
} }
if (GroupLength != 0) if (GroupLength != 0)
@ -1375,7 +1375,7 @@ SeAssignSecurity(PSECURITY_DESCRIPTOR _ParentDescriptor OPTIONAL,
*NewDescriptor = Descriptor; *NewDescriptor = Descriptor;
DPRINT("Descrptor %x\n", Descriptor); DPRINT("Descrptor %p\n", Descriptor);
ASSERT(RtlLengthSecurityDescriptor(Descriptor)); ASSERT(RtlLengthSecurityDescriptor(Descriptor));
return STATUS_SUCCESS; return STATUS_SUCCESS;

View file

@ -623,7 +623,7 @@ SepCreateToken(OUT PHANDLE TokenHandle,
(PVOID*)&AccessToken); (PVOID*)&AccessToken);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("ObCreateObject() failed (Status %lx)\n"); DPRINT1("ObCreateObject() failed (Status %lx)\n", Status);
return Status; return Status;
} }

View file

@ -22,7 +22,7 @@ NTAPI
IoWMIRegistrationControl(IN PDEVICE_OBJECT DeviceObject, IoWMIRegistrationControl(IN PDEVICE_OBJECT DeviceObject,
IN ULONG Action) IN ULONG Action)
{ {
DPRINT1("IoWMIRegistrationControl() called for DO %p, requesting %d action, returning success\n", DPRINT1("IoWMIRegistrationControl() called for DO %p, requesting %lu action, returning success\n",
DeviceObject, Action); DeviceObject, Action);
return STATUS_SUCCESS; return STATUS_SUCCESS;