* Fix several print specifiers.
* Add some missing variables to debug prints.
svn path=/trunk/; revision=59923
63 files changed:
#define SEC_CACHE (0x20000000)
#define MiWaitForPageEvent(Process,Address) do { \
#define SEC_CACHE (0x20000000)
#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); \
} while(0)
KeWaitForSingleObject(&MmWaitPageEvent, 0, KernelMode, FALSE, NULL); \
} while(0)
- DPRINT("MmWithdrawSectionPage(%x,%08x%08x,%x)\n",
+ DPRINT("MmWithdrawSectionPage(%p,%08x%08x,%p)\n",
Segment,
FileOffset->HighPart,
FileOffset->LowPart,
Segment,
FileOffset->HighPart,
FileOffset->LowPart,
- DPRINT1("SWAP ENTRY?! (%x:%08x%08x)\n",
+ DPRINT1("SWAP ENTRY?! (%p:%08x%08x)\n",
Segment,
FileOffset->HighPart,
FileOffset->LowPart);
Segment,
FileOffset->HighPart,
FileOffset->LowPart);
/* Bail early if the reference count isn't where we need it */
if (MmGetReferenceCountPage(Page) != 1)
{
/* Bail early if the reference count isn't where we need it */
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,
MmGetReferenceCountPage(Page));
return STATUS_UNSUCCESSFUL;
Page,
MmGetReferenceCountPage(Page));
return STATUS_UNSUCCESSFUL;
- DPRINT("Finalize (dirty) Segment %x Page %x\n", Segment, Page);
- DPRINT("Segment->FileObject %x\n", Segment->FileObject);
+ DPRINT("Finalize (dirty) Segment %p Page %x\n", Segment, Page);
+ DPRINT("Segment->FileObject %p\n", Segment->FileObject);
DPRINT("Segment->Flags %x\n", Segment->Flags);
WriteZero = TRUE;
DPRINT("Segment->Flags %x\n", Segment->Flags);
WriteZero = TRUE;
- DPRINT("MiWriteBackPage(Segment %x FileObject %x Offset %x)\n",
+ DPRINT("MiWriteBackPage(Segment %p FileObject %p Offset %x)\n",
Segment,
Segment->FileObject,
FileOffset->LowPart);
Segment,
Segment->FileObject,
FileOffset->LowPart);
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,
FileOffset->LowPart,
Swap);
Segment,
FileOffset->LowPart,
Swap);
- 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,
FileOffset->LowPart,
Page);
Segment,
FileOffset->LowPart,
Page);
ExAcquireFastMutex(&MiGlobalPageOperation);
if ((Segment = MmGetSectionAssociation(Page, &FileOffset)))
{
ExAcquireFastMutex(&MiGlobalPageOperation);
if ((Segment = MmGetSectionAssociation(Page, &FileOffset)))
{
- DPRINTC("Withdrawing page (%x) %x:%x\n",
+ DPRINTC("Withdrawing page (%x) %p:%x\n",
Page,
Segment,
FileOffset.LowPart);
Page,
Segment,
FileOffset.LowPart);
Process = entry->Process;
Address = entry->Address;
Process = entry->Process;
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))
{
- DPRINTC("Type %x (%x -> %x)\n",
+ DPRINTC("Type %x (%p -> %p)\n",
MemoryArea->Type,
MemoryArea->StartingAddress,
MemoryArea->EndingAddress);
MemoryArea->Type,
MemoryArea->StartingAddress,
MemoryArea->EndingAddress);
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
- DPRINT("%x:%x, page %x %x\n",
+ DPRINT("%p:%p, page %x %x\n",
}
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,
MemoryArea,
Status = Resources.DoAcquisition(AddressSpace,
MemoryArea,
ASSERT(!MM_IS_WAIT_PTE(MmGetPfnForProcess(Process, Address)));
entry = MmGetRmapListHeadPage(Page);
ASSERT(!MM_IS_WAIT_PTE(MmGetPfnForProcess(Process, Address)));
entry = MmGetRmapListHeadPage(Page);
- DPRINTC("Entry %x\n", entry);
+ DPRINTC("Entry %p\n", entry);
}
ExReleaseFastMutex(&RmapListLock);
}
ExReleaseFastMutex(&RmapListLock);
- 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,
Segment,
FileOffset.LowPart,
Page,
Segment,
FileOffset.LowPart,
PMM_SECTION_SEGMENT Segment;
*NrFreed = 0;
PMM_SECTION_SEGMENT Segment;
*NrFreed = 0;
- DPRINT1("Need to trim %d cache pages\n", Target);
+ DPRINT1("Need to trim %lu cache pages\n", Target);
for (Entry = MiSegmentList.Flink;
*NrFreed < Target && Entry != &MiSegmentList;
Entry = Entry->Flink) {
for (Entry = MiSegmentList.Flink;
*NrFreed < Target && Entry != &MiSegmentList;
Entry = Entry->Flink) {
Freed = MiCacheEvictPages(Segment, Target);
*NrFreed += Freed;
}
Freed = MiCacheEvictPages(Segment, Target);
*NrFreed += Freed;
}
- DPRINT1("Evicted %d cache pages\n", Target);
+ DPRINT1("Evicted %lu cache pages\n", Target);
if (!IsListEmpty(&MiSegmentList)) {
Entry = MiSegmentList.Flink;
if (!IsListEmpty(&MiSegmentList)) {
Entry = MiSegmentList.Flink;
{
/* Do the sync */
DPRINT1("Flushing: %wZ\n", CmHive->FileFullPath);
{
/* Do the sync */
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);
if(!NT_SUCCESS(Status))
{
Status = HvSyncHive(&CmHive->Hive);
if(!NT_SUCCESS(Status))
{
REG_ENUMERATE_KEY_INFORMATION EnumerateKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE();
REG_ENUMERATE_KEY_INFORMATION EnumerateKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
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);
/* Reject classes we don't know about */
KeyHandle, Index, KeyInformationClass, Length);
/* Reject classes we don't know about */
REG_ENUMERATE_VALUE_KEY_INFORMATION EnumerateValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE();
REG_ENUMERATE_VALUE_KEY_INFORMATION EnumerateValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
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);
/* Reject classes we don't know about */
KeyHandle, Index, KeyValueInformationClass, Length);
/* Reject classes we don't know about */
REG_POST_OPERATION_INFORMATION PostOperationInfo;
OBJECT_HANDLE_INFORMATION HandleInfo;
PAGED_CODE();
REG_POST_OPERATION_INFORMATION PostOperationInfo;
OBJECT_HANDLE_INFORMATION HandleInfo;
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);
/* Reject invalid classes */
KeyHandle, KeyInformationClass, Length);
/* Reject invalid classes */
REG_POST_OPERATION_INFORMATION PostOperationInfo;
UNICODE_STRING ValueNameCopy = *ValueName;
PAGED_CODE();
REG_POST_OPERATION_INFORMATION PostOperationInfo;
UNICODE_STRING ValueNameCopy = *ValueName;
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);
/* Verify that the handle is valid and is a registry key */
KeyHandle, ValueName, KeyValueInformationClass, Length);
/* Verify that the handle is valid and is a registry key */
REG_POST_OPERATION_INFORMATION PostOperationInfo;
UNICODE_STRING ValueNameCopy = *ValueName;
PAGED_CODE();
REG_POST_OPERATION_INFORMATION PostOperationInfo;
UNICODE_STRING ValueNameCopy = *ValueName;
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);
/* Verify that the handle is valid and is a registry key */
KeyHandle, ValueName, TitleIndex, Type, DataSize);
/* Verify that the handle is valid and is a registry key */
if (!DebugObject->DebuggerInactive)
{
/* Add the event into the object's list */
if (!DebugObject->DebuggerInactive)
{
/* 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);
InsertTailList(&DebugObject->EventList, &DebugEvent->EventList);
DebugEvent, Message->ApiNumber);
InsertTailList(&DebugObject->EventList, &DebugEvent->EventList);
BOOLEAN UseLpc = FALSE;
PAGED_CODE();
DBGKTRACE(DBGK_EXCEPTION_DEBUG,
BOOLEAN UseLpc = FALSE;
PAGED_CODE();
DBGKTRACE(DBGK_EXCEPTION_DEBUG,
- "ExceptionRecord: %p Port: %p\n", ExceptionRecord, DebugPort);
+ "ExceptionRecord: %p Port: %u\n", ExceptionRecord, DebugPort);
/* Setup the API Message */
ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
/* Setup the API Message */
ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
BOOLEAN NeedsWake = FALSE;
CLIENT_ID ClientId;
PAGED_CODE();
BOOLEAN NeedsWake = FALSE;
CLIENT_ID ClientId;
PAGED_CODE();
- DBGKTRACE(DBGK_OBJECT_DEBUG, "Handle: %p Status: %p\n",
+ DBGKTRACE(DBGK_OBJECT_DEBUG, "Handle: %p Status: %d\n",
DebugHandle, ContinueStatus);
/* Check if we were called from user mode*/
DebugHandle, ContinueStatus);
/* Check if we were called from user mode*/
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
PAGED_CODE();
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
PAGED_CODE();
- DPRINT("NtPulseEvent(EventHandle 0%x PreviousState 0%x)\n",
+ DPRINT("NtPulseEvent(EventHandle 0%p PreviousState 0%p)\n",
EventHandle, PreviousState);
/* Check if we were called from user-mode */
EventHandle, PreviousState);
/* Check if we were called from user-mode */
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
PAGED_CODE();
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
PAGED_CODE();
- DPRINT("NtResetEvent(EventHandle 0%x PreviousState 0%x)\n",
+ DPRINT("NtResetEvent(EventHandle 0%p PreviousState 0%p)\n",
EventHandle, PreviousState);
/* Check if we were called from user-mode */
EventHandle, PreviousState);
/* Check if we were called from user-mode */
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
PAGED_CODE();
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
PAGED_CODE();
- DPRINT("NtSetEvent(EventHandle 0%x PreviousState 0%x)\n",
+ DPRINT("NtSetEvent(EventHandle 0%p PreviousState 0%p)\n",
EventHandle, PreviousState);
/* Check if we were called from user-mode */
EventHandle, PreviousState);
/* Check if we were called from user-mode */
HeadlessGlobals->IsMMIODevice = HeadlessBlock->IsMMIODevice;
HeadlessGlobals->TerminalType = HeadlessBlock->TerminalType;
HeadlessGlobals->SystemGUID = HeadlessBlock->SystemGUID;
HeadlessGlobals->IsMMIODevice = HeadlessBlock->IsMMIODevice;
HeadlessGlobals->TerminalType = HeadlessBlock->TerminalType;
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->TerminalPortAddress,
HeadlessGlobals->TerminalBaudRate);
HeadlessGlobals->TerminalPortNumber,
HeadlessGlobals->TerminalPortAddress,
HeadlessGlobals->TerminalBaudRate);
PLIST_ENTRY ListEntry;
PMEMORY_ALLOCATION_DESCRIPTOR MemDescriptor;
PLIST_ENTRY ListEntry;
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 */
for (ListEntry = LoaderBlock->MemoryDescriptorListHead.Blink;
/* Loop the memory descriptors, beginning at the end */
for (ListEntry = LoaderBlock->MemoryDescriptorListHead.Blink;
ExAcquireResourceLock(Resource, &LockHandle);
/* Dump debug information */
ExAcquireResourceLock(Resource, &LockHandle);
/* Dump debug information */
- DPRINT1("Resource @ %lx\n", Resource);
+ DPRINT1("Resource @ %p\n", Resource);
DPRINT1(" ActiveEntries = %04lx Flags = %s%s%s\n",
Resource->ActiveEntries,
IsOwnedExclusive(Resource) ? "IsOwnedExclusive " : "",
DPRINT1(" ActiveEntries = %04lx Flags = %s%s%s\n",
Resource->ActiveEntries,
IsOwnedExclusive(Resource) ? "IsOwnedExclusive " : "",
Spi->Reserved = 0;
Spi->ProcessorFeatureBits = KeFeatureBits;
Spi->Reserved = 0;
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);
return STATUS_SUCCESS;
Spi->ProcessorLevel, Spi->ProcessorRevision);
return STATUS_SUCCESS;
!(Process->ActiveThreads) &&
(IsListEmpty(&Process->Pcb.ThreadListHead)))
{
!(Process->ActiveThreads) &&
(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);
CurrentSize = 0;
ImageNameMaximumLength = 0;
Process, Process->ImageFileName, Process->UniqueProcessId);
CurrentSize = 0;
ImageNameMaximumLength = 0;
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->Pcb.KernelTime,
MiFreeSwapPages,
TheIdleProcess->UniqueProcessId,
TheIdleProcess->Pcb.KernelTime,
MiFreeSwapPages,
if (Thread->Tcb.SpecialApcDisable)
{
/* We're nice and do it behind your back */
if (Thread->Tcb.SpecialApcDisable)
{
/* 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",
WorkItem->WorkerRoutine,
WorkItem->Parameter,
"with APCs disabled!\n",
WorkItem->WorkerRoutine,
WorkItem->Parameter,
(Queue->DynamicThreadCount < 16))
{
/* Stuff is still on the queue and nobody did anything about it */
(Queue->DynamicThreadCount < 16))
{
/* 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);
DPRINT1("Dynamic threads queued %d\n", Queue->DynamicThreadCount);
}
ExpCreateWorkerThread(i, TRUE);
DPRINT1("Dynamic threads queued %d\n", Queue->DynamicThreadCount);
}
(WorkQueue->DynamicThreadCount < 16))
{
/* Let the balance manager know about it */
(WorkQueue->DynamicThreadCount < 16))
{
/* 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.MaximumCount);
KeSetEvent(&ExpThreadSetManagerEvent, 0, FALSE);
WorkQueue->WorkerQueue.CurrentCount,
WorkQueue->WorkerQueue.MaximumCount);
KeSetEvent(&ExpThreadSetManagerEvent, 0, FALSE);
{
PVOID Result;
Result = ExAllocatePoolWithTag(NonPagedPool, Bytes, TAG_TABLE);
{
PVOID Result;
Result = ExAllocatePoolWithTag(NonPagedPool, Bytes, TAG_TABLE);
- DPRINT("LockAllocate(%d) => %p\n", Bytes, Result);
+ DPRINT("LockAllocate(%lu) => %p\n", Bytes, Result);
ULARGE_INTEGER UnsignedStart;
ULARGE_INTEGER UnsignedEnd;
ULARGE_INTEGER UnsignedStart;
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,
FileOffset->HighPart,
FileOffset->LowPart,
&FileObject->FileName,
FileOffset->HighPart,
FileOffset->LowPart,
{
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.LowPart,
Conflict->Exclusive.FileLock.EndingByte.HighPart,
Conflict->Exclusive.FileLock.StartingByte.HighPart,
Conflict->Exclusive.FileLock.StartingByte.LowPart,
Conflict->Exclusive.FileLock.EndingByte.HighPart,
- 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,
Conflict->Exclusive.FileLock.StartingByte.HighPart,
Conflict->Exclusive.FileLock.StartingByte.LowPart,
&FileObject->FileName,
Conflict->Exclusive.FileLock.StartingByte.HighPart,
Conflict->Exclusive.FileLock.StartingByte.LowPart,
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.StartingByte.HighPart,
Entry->Exclusive.FileLock.StartingByte.LowPart,
Entry->Exclusive.FileLock.ExclusiveLock,
Entry->Exclusive.FileLock.StartingByte.HighPart,
Entry->Exclusive.FileLock.StartingByte.LowPart,
PVOID Result;
PBASE_MCB Mcb = (PBASE_MCB)Table->TableContext;
Result = ExAllocatePoolWithTag(Mcb->PoolType, Bytes, 'LMCB');
PVOID Result;
PBASE_MCB Mcb = (PBASE_MCB)Table->TableContext;
Result = ExAllocatePoolWithTag(Mcb->PoolType, Bytes, 'LMCB');
- DPRINT("McbMappingAllocate(%d) => %p\n", Bytes, Result);
+ DPRINT("McbMappingAllocate(%lu) => %p\n", Bytes, Result);
/* finally insert the resulting run */
Existing = RtlInsertElementGenericTable(&Mcb->Mapping->Table, &Node, sizeof(Node), &NewElement);
/* finally insert the resulting run */
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);
// NB: Two consecutive runs can only be merged, if actual LBNs also match!
ASSERT(NewElement);
// NB: Two consecutive runs can only be merged, if actual LBNs also match!
- 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);
Result = FsRtlAddBaseMcbEntry(&(Mcb->BaseMcb),
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlAddBaseMcbEntry(&(Mcb->BaseMcb),
SectorCount);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
SectorCount);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
- DPRINT("Done %d\n", Result);
+ DPRINT("Done %u\n", Result);
- if (RunFound) DPRINT("RunFound(%d %d %d)\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 (RunFoundHigher) DPRINT("RunFoundHigher(%d %d %d)\n", RunFoundHigher->RunStartVbn.LowPart, RunFoundHigher->RunEndVbn.LowPart, RunFoundHigher->StartingLbn.LowPart);
+ if (RunFound) DPRINT("RunFound(%lu %lu %lu)\n", RunFound->RunStartVbn.LowPart, RunFound->RunEndVbn.LowPart, RunFound->StartingLbn.LowPart);
+ if (RunFoundLower) DPRINT("RunFoundLower(%lu %lu %lu)\n", RunFoundLower->RunStartVbn.LowPart, RunFoundLower->RunEndVbn.LowPart, RunFoundLower->StartingLbn.LowPart);
+ if (RunFoundHigher) DPRINT("RunFoundHigher(%lu %lu %lu)\n", RunFoundHigher->RunStartVbn.LowPart, RunFoundHigher->RunEndVbn.LowPart, RunFoundHigher->StartingLbn.LowPart);
- DPRINT("FsRtlGetNextLargeMcbEntry Mcb %p RunIndex %d\n", Mcb, RunIndex);
+ DPRINT("FsRtlGetNextLargeMcbEntry Mcb %p RunIndex %lu\n", Mcb, RunIndex);
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlGetNextBaseMcbEntry(&(Mcb->BaseMcb),
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlGetNextBaseMcbEntry(&(Mcb->BaseMcb),
SectorCount);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
SectorCount);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
- DPRINT("Done %d\n", Result);
+ DPRINT("Done %u\n", Result);
- DPRINT("FsRtlLookupLargeMcbEntry Mcb %x Vbn %x\n", Mcb, (ULONG)Vbn);
+ DPRINT("FsRtlLookupLargeMcbEntry Mcb %p Vbn %x\n", Mcb, (ULONG)Vbn);
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlLookupBaseMcbEntry(&(Mcb->BaseMcb),
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlLookupBaseMcbEntry(&(Mcb->BaseMcb),
Index);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
Index);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
- DPRINT("Done %d\n", Result);
+ DPRINT("Done %u\n", Result);
- DPRINT("FsRtlLookupLastLargeMcbEntryAndIndex %x\n", OpaqueMcb);
+ DPRINT("FsRtlLookupLastLargeMcbEntryAndIndex %p\n", OpaqueMcb);
KeAcquireGuardedMutex(OpaqueMcb->GuardedMutex);
Result = FsRtlLookupLastBaseMcbEntryAndIndex(&(OpaqueMcb->BaseMcb),
KeAcquireGuardedMutex(OpaqueMcb->GuardedMutex);
Result = FsRtlLookupLastBaseMcbEntryAndIndex(&(OpaqueMcb->BaseMcb),
Index);
KeReleaseGuardedMutex(OpaqueMcb->GuardedMutex);
Index);
KeReleaseGuardedMutex(OpaqueMcb->GuardedMutex);
- DPRINT("Done %d\n", Result);
+ DPRINT("Done %u\n", Result);
- DPRINT("FsRtlLookupLastLargeMcbEntry Mcb %x\n", Mcb);
+ DPRINT("FsRtlLookupLastLargeMcbEntry Mcb %p\n", Mcb);
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlLookupLastBaseMcbEntry(&(Mcb->BaseMcb),
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlLookupLastBaseMcbEntry(&(Mcb->BaseMcb),
Lbn);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
Lbn);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
- DPRINT("Done %d\n", Result);
+ DPRINT("Done %u\n", Result);
- DPRINT("FsRtlNumberOfRunsInLargeMcb Mcb %x\n", Mcb);
+ DPRINT("FsRtlNumberOfRunsInLargeMcb Mcb %p\n", Mcb);
/* Read the number of runs while holding the MCB lock */
KeAcquireGuardedMutex(Mcb->GuardedMutex);
NumberOfRuns = FsRtlNumberOfRunsInBaseMcb(&(Mcb->BaseMcb));
KeReleaseGuardedMutex(Mcb->GuardedMutex);
/* Read the number of runs while holding the MCB lock */
KeAcquireGuardedMutex(Mcb->GuardedMutex);
NumberOfRuns = FsRtlNumberOfRunsInBaseMcb(&(Mcb->BaseMcb));
KeReleaseGuardedMutex(Mcb->GuardedMutex);
- DPRINT("Done %d\n", NumberOfRuns);
+ DPRINT("Done %lu\n", NumberOfRuns);
/* Return the count */
return NumberOfRuns;
/* Return the count */
return NumberOfRuns;
IN LONGLONG Vbn,
IN LONGLONG SectorCount)
{
IN LONGLONG Vbn,
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);
FsRtlRemoveBaseMcbEntry(&(Mcb->BaseMcb), Vbn, SectorCount);
KeAcquireGuardedMutex(Mcb->GuardedMutex);
FsRtlRemoveBaseMcbEntry(&(Mcb->BaseMcb), Vbn, SectorCount);
- 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);
Result = FsRtlSplitBaseMcb(&(Mcb->BaseMcb),
KeAcquireGuardedMutex(Mcb->GuardedMutex);
Result = FsRtlSplitBaseMcb(&(Mcb->BaseMcb),
Amount);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
Amount);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
- DPRINT("Done %d\n", Result);
+ DPRINT("Done %u\n", Result);
FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb,
IN LONGLONG Vbn)
{
FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb,
IN LONGLONG Vbn)
{
- DPRINT("FsRtlTruncateLargeMcb %x Vbn %x\n", Mcb, (ULONG)Vbn);
+ DPRINT("FsRtlTruncateLargeMcb %p Vbn %x\n", Mcb, (ULONG)Vbn);
KeAcquireGuardedMutex(Mcb->GuardedMutex);
FsRtlTruncateBaseMcb(&(Mcb->BaseMcb), Vbn);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
KeAcquireGuardedMutex(Mcb->GuardedMutex);
FsRtlTruncateBaseMcb(&(Mcb->BaseMcb), Vbn);
KeReleaseGuardedMutex(Mcb->GuardedMutex);
- 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,
TraverseCallback, SubjectContext, FilterCallback);
NotifySync, NotifyList, FsContext, FullDirectoryName, WatchTree, IgnoreBuffer, CompletionFilter, NotifyIrp,
TraverseCallback, SubjectContext, FilterCallback);
- DPRINT("DriveNumber %d\n", DriveNumber);
+ DPRINT("DriveNumber %lu\n", DriveNumber);
/* Build drive name */
swprintf(DriveNameBuffer,
/* Build drive name */
swprintf(DriveNameBuffer,
- DPRINT("DiskGeometry.BytesPerSector: %d\n",
+ DPRINT("DiskGeometry.BytesPerSector: %lu\n",
DiskGeometry.BytesPerSector);
if (DeviceObject->Characteristics & FILE_REMOVABLE_MEDIA)
DiskGeometry.BytesPerSector);
if (DeviceObject->Characteristics & FILE_REMOVABLE_MEDIA)
RDiskCount = xHalpGetRDiskCount();
RDiskCount = xHalpGetRDiskCount();
- DPRINT("RDiskCount %d\n", RDiskCount);
+ DPRINT("RDiskCount %lu\n", RDiskCount);
Buffer1 = ExAllocatePoolWithTag(PagedPool,
64 * sizeof(WCHAR),
Buffer1 = ExAllocatePoolWithTag(PagedPool,
64 * sizeof(WCHAR),
}
/* 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,
- L"\\Device\\Harddisk%d\\Partition0",
- i);
- RtlInitUnicodeString(&UnicodeString1,
- Buffer1);
+ swprintf(Buffer1, L"\\Device\\Harddisk%lu\\Partition0", i);
+ RtlInitUnicodeString(&UnicodeString1, Buffer1);
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString1,
InitializeObjectAttributes(&ObjectAttributes,
&UnicodeString1,
- swprintf(Buffer2,
- L"\\??\\PhysicalDrive%d",
- i);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ swprintf(Buffer2, L"\\??\\PhysicalDrive%lu", i);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
DPRINT("Creating link: %S ==> %S\n",
Buffer2,
DPRINT("Creating link: %S ==> %S\n",
Buffer2,
ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION));
for (i = 0; i < ConfigInfo->DiskCount; i++)
{
ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION));
for (i = 0; i < ConfigInfo->DiskCount; i++)
{
- swprintf(Buffer1,
- L"\\Device\\Harddisk%d\\Partition0",
- i);
- RtlInitUnicodeString(&UnicodeString1,
- Buffer1);
+ swprintf(Buffer1, L"\\Device\\Harddisk%lu\\Partition0", i);
+ RtlInitUnicodeString(&UnicodeString1, Buffer1);
- Status = xHalQueryDriveLayout(&UnicodeString1,
- &LayoutArray[i]);
+ Status = xHalQueryDriveLayout(&UnicodeString1, &LayoutArray[i]);
if (!NT_SUCCESS(Status))
{
DbgPrint("xHalQueryDriveLayout() failed (Status = 0x%lx)\n",
if (!NT_SUCCESS(Status))
{
DbgPrint("xHalQueryDriveLayout() failed (Status = 0x%lx)\n",
LayoutArray[i]->PartitionEntry[j].RewritePartition == FALSE)
{
swprintf(Buffer2,
LayoutArray[i]->PartitionEntry[j].RewritePartition == FALSE)
{
swprintf(Buffer2,
- L"\\Device\\Harddisk%d\\Partition%d",
- i,
- LayoutArray[i]->PartitionEntry[j].PartitionNumber);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ L"\\Device\\Harddisk%lu\\Partition%lu",
+ i,
+ LayoutArray[i]->PartitionEntry[j].PartitionNumber);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
/* Assign drive */
DPRINT(" %wZ\n", &UnicodeString2);
/* Assign drive */
DPRINT(" %wZ\n", &UnicodeString2);
if (LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition == FALSE)
{
swprintf(Buffer2,
if (LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition == FALSE)
{
swprintf(Buffer2,
- L"\\Device\\Harddisk%lu\\Partition%d",
- DiskNumber,
- LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ L"\\Device\\Harddisk%lu\\Partition%lu",
+ DiskNumber,
+ LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
/* Assign drive */
DPRINT(" %wZ\n", &UnicodeString2);
/* Assign drive */
DPRINT(" %wZ\n", &UnicodeString2);
IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType))
{
swprintf(Buffer2,
IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType))
{
swprintf(Buffer2,
- L"\\Device\\Harddisk%d\\Partition%d",
- DiskNumber,
- LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ L"\\Device\\Harddisk%lu\\Partition%lu",
+ DiskNumber,
+ LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
/* Assign drive */
DPRINT(" %wZ\n",
/* Assign drive */
DPRINT(" %wZ\n",
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0)
{
swprintf(Buffer2,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0)
{
swprintf(Buffer2,
- L"\\Device\\Harddisk%d\\Partition%d",
- DiskNumber,
- LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ L"\\Device\\Harddisk%lu\\Partition%lu",
+ DiskNumber,
+ LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
/* Assign drive */
DPRINT(" %wZ\n",
/* Assign drive */
DPRINT(" %wZ\n",
IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType))
{
swprintf(Buffer2,
IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType))
{
swprintf(Buffer2,
- L"\\Device\\Harddisk%d\\Partition%d",
- DiskNumber,
- LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ L"\\Device\\Harddisk%lu\\Partition%lu",
+ DiskNumber,
+ LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
/* Assign drive */
DPRINT(" %wZ\n",
/* Assign drive */
DPRINT(" %wZ\n",
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0)
{
swprintf(Buffer2,
LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber != 0)
{
swprintf(Buffer2,
- L"\\Device\\Harddisk%d\\Partition%d",
- DiskNumber,
- LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ L"\\Device\\Harddisk%lu\\Partition%lu",
+ DiskNumber,
+ LayoutArray[DiskNumber]->PartitionEntry[j].PartitionNumber);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
/* Assign drive */
DPRINT(" %wZ\n",
/* Assign drive */
DPRINT(" %wZ\n",
if (LayoutArray[i]->PartitionCount == 1 &&
LayoutArray[i]->PartitionEntry[0].PartitionType == 0)
{
if (LayoutArray[i]->PartitionCount == 1 &&
LayoutArray[i]->PartitionEntry[0].PartitionType == 0)
{
- swprintf(Buffer2,
- L"\\Device\\Harddisk%d\\Partition1",
- i);
- RtlInitUnicodeString(&UnicodeString2,
- Buffer2);
+ swprintf(Buffer2, L"\\Device\\Harddisk%lu\\Partition1", i);
+ RtlInitUnicodeString(&UnicodeString2, Buffer2);
/* Assign drive */
DPRINT(" %wZ\n",
/* Assign drive */
DPRINT(" %wZ\n",
end_assign_disks:
/* Assign floppy drives */
end_assign_disks:
/* 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,
- L"\\Device\\Floppy%d",
- i);
- RtlInitUnicodeString(&UnicodeString1,
- Buffer1);
+ swprintf(Buffer1, L"\\Device\\Floppy%lu", i);
+ RtlInitUnicodeString(&UnicodeString1, Buffer1);
/* Assign drive letters A: or B: or first free drive letter */
DPRINT(" %wZ\n",
/* Assign drive letters A: or B: or first free drive letter */
DPRINT(" %wZ\n",
}
/* 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,
- L"\\Device\\CdRom%d",
- i);
- RtlInitUnicodeString(&UnicodeString1,
- Buffer1);
+ swprintf(Buffer1, L"\\Device\\CdRom%lu", i);
+ RtlInitUnicodeString(&UnicodeString1, Buffer1);
/* Assign first free drive letter */
DPRINT(" %wZ\n", &UnicodeString1);
/* Assign first free drive letter */
DPRINT(" %wZ\n", &UnicodeString1);
/* Also update the maximum sector */
MaxSector = GET_PARTITION_LENGTH(PartitionDescriptor);
/* Also update the maximum sector */
MaxSector = GET_PARTITION_LENGTH(PartitionDescriptor);
- DPRINT1("FSTUB: MaxSector now = %#08lx\n", MaxSector);
+ DPRINT1("FSTUB: MaxSector now = %I64d\n", MaxSector);
DPRINT1("FSTUB: Drive %#p has no valid MBR. Make it into a "
"super-floppy\n",
DeviceObject);
DPRINT1("FSTUB: Drive %#p has no valid MBR. Make it into a "
"super-floppy\n",
DeviceObject);
- DPRINT1("FSTUB: Drive has %#08lx sectors and is %#016I64x "
+ DPRINT1("FSTUB: Drive has %I64d sectors and is %#016I64x "
"bytes large\n",
EndSector, EndSector * DiskGeometry.BytesPerSector);
"bytes large\n",
EndSector, EndSector * DiskGeometry.BytesPerSector);
case PARTITION_STYLE_MBR:
if (DriveLayout->PartitionCount % 4 != 0)
{
case PARTITION_STYLE_MBR:
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);
DPRINT("DiskId: %s\n", Guid);
DPRINT("StartingUsableOffset: %I64x\n", DriveLayout->Gpt.StartingUsableOffset.QuadPart);
DPRINT("UsableLength: %I64x\n", DriveLayout->Gpt.UsableLength.QuadPart);
DPRINT("DiskId: %s\n", Guid);
DPRINT("StartingUsableOffset: %I64x\n", DriveLayout->Gpt.StartingUsableOffset.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++)
{
FstubDbgPrintPartitionEx(DriveLayout->PartitionEntry, i);
for (i = 0; i < DriveLayout->PartitionCount; i++)
{
FstubDbgPrintPartitionEx(DriveLayout->PartitionEntry, i);
- DPRINT("Unsupported partition style: %ld\n", DriveLayout->PartitionStyle);
+ DPRINT("Unsupported partition style: %lu\n", DriveLayout->PartitionStyle);
CHAR Guid[38];
PAGED_CODE();
CHAR Guid[38];
PAGED_CODE();
- DPRINT("Printing partition %ld\n", PartitionNumber);
+ DPRINT("Printing partition %lu\n", PartitionNumber);
switch (PartitionEntry[PartitionNumber].PartitionStyle)
{
case PARTITION_STYLE_MBR:
DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.QuadPart);
DPRINT(" PartitionLength: %I64x\n", PartitionEntry[PartitionNumber].PartitionLength.QuadPart);
switch (PartitionEntry[PartitionNumber].PartitionStyle)
{
case PARTITION_STYLE_MBR:
DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.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(" RecognizedPartition: %d\n", PartitionEntry[PartitionNumber].Mbr.RecognizedPartition);
- DPRINT(" HiddenSectors: %ld\n", PartitionEntry[PartitionNumber].Mbr.HiddenSectors);
+ DPRINT(" BootIndicator: %u\n", PartitionEntry[PartitionNumber].Mbr.BootIndicator);
+ DPRINT(" RecognizedPartition: %u\n", PartitionEntry[PartitionNumber].Mbr.RecognizedPartition);
+ DPRINT(" HiddenSectors: %lu\n", PartitionEntry[PartitionNumber].Mbr.HiddenSectors);
break;
case PARTITION_STYLE_GPT:
DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.QuadPart);
DPRINT(" PartitionLength: %I64x\n", PartitionEntry[PartitionNumber].PartitionLength.QuadPart);
break;
case PARTITION_STYLE_GPT:
DPRINT(" StartingOffset: %I64x\n", PartitionEntry[PartitionNumber].StartingOffset.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);
DPRINT(" PartitionType: %s\n", Guid);
FstubDbgGuidToString(&(PartitionEntry[PartitionNumber].Gpt.PartitionId), Guid);
DPRINT(" PartitionId: %s\n", Guid);
FstubDbgGuidToString(&(PartitionEntry[PartitionNumber].Gpt.PartitionType), Guid);
DPRINT(" PartitionType: %s\n", Guid);
FstubDbgGuidToString(&(PartitionEntry[PartitionNumber].Gpt.PartitionId), 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);
break;
DPRINT(" Name: %ws\n", PartitionEntry[PartitionNumber].Gpt.Name);
break;
PAGED_CODE();
DPRINT("FSTUB: SET_PARTITION_INFORMATION_EX: %p\n", PartitionEntry);
PAGED_CODE();
DPRINT("FSTUB: SET_PARTITION_INFORMATION_EX: %p\n", PartitionEntry);
- DPRINT("Modifying partition %ld\n", PartitionNumber);
+ DPRINT("Modifying partition %lu\n", PartitionNumber);
switch (PartitionEntry->PartitionStyle)
{
case PARTITION_STYLE_MBR:
switch (PartitionEntry->PartitionStyle)
{
case PARTITION_STYLE_MBR:
DPRINT(" PartitionType: %s\n", Guid);
FstubDbgGuidToString(&(PartitionEntry->Gpt.PartitionId), Guid);
DPRINT(" PartitionId: %s\n", Guid);
DPRINT(" PartitionType: %s\n", Guid);
FstubDbgGuidToString(&(PartitionEntry->Gpt.PartitionId), 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);
break;
DPRINT(" Name: %ws\n", PartitionEntry->Gpt.Name);
break;
- DPRINT("Unsupported partition style: %ld\n", DriveLayout->PartitionStyle);
+ DPRINT("Unsupported partition style: %lu\n", DriveLayout->PartitionStyle);
Status = STATUS_NOT_SUPPORTED;
}
Status = STATUS_NOT_SUPPORTED;
}
}
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;
goto cleanup;
}
Status = STATUS_UNSUCCESSFUL;
goto cleanup;
}
if (SymbolicLinkName == NULL)
return STATUS_INVALID_PARAMETER_1;
if (SymbolicLinkName == NULL)
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 */
/* Get GUID from SymbolicLinkName */
/* Symbolic link name is \??\ACPI#PNP0501#1#{GUID}\ReferenceString */
/* Get GUID from SymbolicLinkName */
SymLink.Buffer = SymbolicLinkName->Buffer;
SymLink.MaximumLength = SymLink.Length = (USHORT)((ULONG_PTR)(EndPosition + 1) - (ULONG_PTR)SymLink.Buffer);
SymLink.Buffer = SymbolicLinkName->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,
KEY_CREATE_SUB_KEY,
Status = OpenRegistryHandlesFromSymbolicLink(SymbolicLinkName,
KEY_CREATE_SUB_KEY,
LPWSTR Start;
BOOLEAN SafeToUnload = TRUE;
LPWSTR Start;
BOOLEAN SafeToUnload = TRUE;
- DPRINT("IopUnloadDriver('%wZ', %d)\n", DriverServiceName, UnloadPnpDrivers);
+ DPRINT("IopUnloadDriver('%wZ', %u)\n", DriverServiceName, UnloadPnpDrivers);
if (!DriverObject->MajorFunction[i])
{
/* Print a warning in the debug log */
if (!DriverObject->MajorFunction[i])
{
/* 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);
/* Fix it up */
&DriverObject->DriverName, i);
/* Fix it up */
ACCESS_MASK DesiredAccess;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
ULONG BufferLength;
ACCESS_MASK DesiredAccess;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
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);
/* Get the access type */
DeviceHandle, IoControlCode, IsDevIoCtl);
/* Get the access type */
{
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);
{
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);
- 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);
/* Tag should match */
if (TrackingBlock->Tag != Tag)
{
/* Tag should match */
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);
}
IN OUT PVOID Buffer,
IN ULONG BufferLength)
{
IN OUT PVOID Buffer,
IN ULONG BufferLength)
{
- DPRINT("NtPlugPlayControl(%lu %p %lu) called\n",
+ DPRINT("NtPlugPlayControl(%d %p %lu) called\n",
PlugPlayControlClass, Buffer, BufferLength);
/* Function can only be called from user-mode */
PlugPlayControlClass, Buffer, BufferLength);
/* Function can only be called from user-mode */
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);
/* Start from the specified device node */
Context->DeviceNode, Context->FirstDeviceNode, Context->Action, Context->Context);
/* Start from the specified device node */
/* Check if we couldn't satsify a requirement or its alternates */
if (AlternateRequired && !(IoDesc->Option & IO_RESOURCE_ALTERNATIVE))
{
/* Check if we couldn't satsify a requirement or its alternates */
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;
/* Break out of this loop and try the next list */
break;
if (!FoundResource && IoDesc->Option == 0)
{
/* Break out of this loop and try the next list */
if (!FoundResource && IoDesc->Option == 0)
{
/* 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;
}
else if (!FoundResource)
break;
}
else if (!FoundResource)
/* Check if we need an alternate with no resources left */
if (AlternateRequired)
{
/* Check if we need an alternate with no resources left */
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 */
continue;
/* Try the next alternate list */
continue;
Status = LocateChildDevice(DeviceExtension, DevicePath, InstancePath, &Device);
if (Status != STATUS_NO_SUCH_DEVICE || NextInstance > 9999)
{
Status = LocateChildDevice(DeviceExtension, DevicePath, InstancePath, &Device);
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,
(PWSTR)DeviceKeyHandle,
L"NextInstance");
RtlDeleteRegistryValue(RTL_REGISTRY_HANDLE,
(PWSTR)DeviceKeyHandle,
L"NextInstance");
/* Set the cache line */
if (CacheLine > KeLargestCacheLine) KeLargestCacheLine = CacheLine;
/* Set the cache line */
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,
Pcr->SecondLevelCacheSize,
KeLargestCacheLine,
KePrefetchNTAGranularity,
Pcr->SecondLevelCacheSize,
KeLargestCacheLine,
}
/* 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,
ExceptionRecord->ExceptionCode,
ExceptionRecord->ExceptionAddress,
PsGetCurrentProcess()->ImageFileName,
ExceptionRecord->ExceptionCode,
ExceptionRecord->ExceptionAddress,
KIRQL oldIrql;
PUSHORT Gdt;
KIRQL oldIrql;
PUSHORT Gdt;
- DPRINT("KeSetBaseGdtSelector(Entry %x, Base %x)\n",
- Entry, Base);
+ DPRINT("KeSetBaseGdtSelector(Entry %x, Base %p)\n", Entry, Base);
KeAcquireSpinLock(&GdtLock, &oldIrql);
KeAcquireSpinLock(&GdtLock, &oldIrql);
- 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 */
for (Page = 0; Page < IdentityMap->PagesCount; Page++)
/* Free all allocated pages, if any */
for (Page = 0; Page < IdentityMap->PagesCount; Page++)
}
/* 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,
Instructions[i],
Instructions[i + 1],
i,
Instructions[i],
Instructions[i + 1],
BOOLEAN Expired = FALSE;
PLIST_ENTRY ListHead, NextEntry;
PKTIMER CurrentTimer;
BOOLEAN Expired = FALSE;
PLIST_ENTRY ListHead, NextEntry;
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 */
if (!Timer->Period) Timer->Header.SignalState = FALSE;
/* Check if the period is zero */
if (!Timer->Period) Timer->Header.SignalState = FALSE;
/* Otherwise, quit */
ObDereferenceObject(ServerPort);
DPRINT1("Client section mapping failed: %lx\n", Status);
/* Otherwise, quit */
ObDereferenceObject(ServerPort);
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,
ConnectMessage->ClientView.ViewSize,
SectionOffset);
ServerPort->ClientSectionBase,
ConnectMessage->ClientView.ViewSize,
SectionOffset);
/* Return the handle to user mode */
*PortHandle = Handle;
LPCTRACE(LPC_COMPLETE_DEBUG,
/* Return the handle to user mode */
*PortHandle = Handle;
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,
Message,
ConnectMessage,
Handle,
Message,
ConnectMessage,
KPROCESSOR_MODE PreviousMode = KeGetPreviousMode();
PETHREAD Thread;
PAGED_CODE();
KPROCESSOR_MODE PreviousMode = KeGetPreviousMode();
PETHREAD Thread;
PAGED_CODE();
- LPCTRACE(LPC_COMPLETE_DEBUG, "Handle: %lx\n", PortHandle);
+ LPCTRACE(LPC_COMPLETE_DEBUG, "Handle: %p\n", PortHandle);
/* Get the Port Object */
Status = ObReferenceObjectByHandle(PortHandle,
/* Get the Port Object */
Status = ObReferenceObjectByHandle(PortHandle,
/* Return the handle */
*PortHandle = Handle;
LPCTRACE(LPC_CONNECT_DEBUG,
/* Return the handle */
*PortHandle = Handle;
LPCTRACE(LPC_CONNECT_DEBUG,
- "Handle: %lx. Length: %lx\n",
+ "Handle: %p. Length: %lx\n",
Handle,
PortMessageLength);
Handle,
PortMessageLength);
PortHandle);
/* Return success or the error */
PortHandle);
/* 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);
{
NTSTATUS Status;
PAGED_CODE();
{
NTSTATUS Status;
PAGED_CODE();
- LPCTRACE(LPC_LISTEN_DEBUG, "Handle: %lx\n", PortHandle);
+ LPCTRACE(LPC_LISTEN_DEBUG, "Handle: %p\n", PortHandle);
/* Wait forever for a connection request. */
for (;;)
/* Wait forever for a connection request. */
for (;;)
PAGED_CODE();
LPCTRACE(LPC_REPLY_DEBUG,
PAGED_CODE();
LPCTRACE(LPC_REPLY_DEBUG,
- "Handle: %lx. Message: %p.\n",
+ "Handle: %p. Message: %p.\n",
PortHandle,
ReplyMessage);
PortHandle,
ReplyMessage);
PAGED_CODE();
LPCTRACE(LPC_REPLY_DEBUG,
PAGED_CODE();
LPCTRACE(LPC_REPLY_DEBUG,
- "Handle: %lx. Messages: %p/%p. Context: %p\n",
+ "Handle: %p. Messages: %p/%p. Context: %p\n",
PortHandle,
ReplyMessage,
ReceiveMessage,
PortHandle,
ReplyMessage,
ReceiveMessage,
Cleanup:
/* All done, dereference the port and return the status */
LPCTRACE(LPC_REPLY_DEBUG,
Cleanup:
/* All done, dereference the port and return the status */
LPCTRACE(LPC_REPLY_DEBUG,
- "Port: %p. Status: %p\n",
+ "Port: %p. Status: %d\n",
Port,
Status);
if (ConnectionPort) ObDereferenceObject(ConnectionPort);
Port,
Status);
if (ConnectionPort) ObDereferenceObject(ConnectionPort);
/* All done */
LPCTRACE(LPC_SEND_DEBUG,
/* All done */
LPCTRACE(LPC_SEND_DEBUG,
- "Port: %p. Status: %p\n",
+ "Port: %p. Status: %d\n",
ULONG MessageType;
PAGED_CODE();
LPCTRACE(LPC_SEND_DEBUG,
ULONG MessageType;
PAGED_CODE();
LPCTRACE(LPC_SEND_DEBUG,
- "Handle: %lx. Message: %p. Type: %lx\n",
+ "Handle: %p. Message: %p. Type: %lx\n",
PortHandle,
LpcRequest,
LpcpGetMessageType(LpcRequest));
PortHandle,
LpcRequest,
LpcpGetMessageType(LpcRequest));
/* All done with a failure*/
LPCTRACE(LPC_SEND_DEBUG,
/* All done with a failure*/
LPCTRACE(LPC_SEND_DEBUG,
- "Port: %p. Status: %p\n",
+ "Port: %p. Status: %d\n",
ULONG MessageType;
PAGED_CODE();
LPCTRACE(LPC_SEND_DEBUG,
ULONG MessageType;
PAGED_CODE();
LPCTRACE(LPC_SEND_DEBUG,
- "Handle: %lx. Messages: %p/%p. Type: %lx\n",
+ "Handle: %p. Messages: %p/%p. Type: %lx\n",
PortHandle,
LpcRequest,
LpcReply,
PortHandle,
LpcRequest,
LpcReply,
/* All done */
LPCTRACE(LPC_SEND_DEBUG,
/* All done */
LPCTRACE(LPC_SEND_DEBUG,
- "Port: %p. Status: %p\n",
+ "Port: %p. Status: %d\n",
Port,
Status);
ObDereferenceObject(Port);
Port,
Status);
ObDereferenceObject(Port);
//
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,
OriginalType);
if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint();
NumberOfBytes,
OriginalType);
if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint();
//
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,
OriginalType);
if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint();
NumberOfBytes,
OriginalType);
if (ExpPoolFlags & POOL_FLAG_CRASH_ON_FAILURE) DbgBreakPoint();
MmSizeOfNonPagedPoolInBytes);
MmNonPagedPoolStart = (PVOID)PAGE_ALIGN(MmNonPagedPoolStart);
NonPagedPoolExpansionVa = MmNonPagedPoolStart;
MmSizeOfNonPagedPoolInBytes);
MmNonPagedPoolStart = (PVOID)PAGE_ALIGN(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);
//
MmNumberOfSystemPtes = MiAddressToPte(MmNonPagedPoolExpansionStart) -
PointerPte;
MmNumberOfSystemPtes--;
MmNumberOfSystemPtes = MiAddressToPte(MmNonPagedPoolExpansionStart) -
PointerPte;
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);
//
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);
- 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);
/* Check if no values are set for the heap limits */
MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
/* Check if no values are set for the heap limits */
PMMPFN Pfn1;
MMPTE TempPte;
PMMPTE PointerToPteForProtoPage;
PMMPFN Pfn1;
MMPTE TempPte;
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 */
ASSERT(*InPageBlock == NULL);
/* Windowss does this check */
ASSERT(*InPageBlock == NULL);
{
/* 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 */
MmRebalanceMemoryConsumers();
/* Call RosMm and see if it can release any pages for us */
MmRebalanceMemoryConsumers();
if (--MmAvailablePages < MmMinimumFreePages)
{
/* FIXME: Should wake up the MPW and working set manager, if we had one */
if (--MmAvailablePages < MmMinimumFreePages)
{
/* 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 */
MmRebalanceMemoryConsumers();
/* Call RosMm and see if it can release any pages for us */
MmRebalanceMemoryConsumers();
{
/* 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 */
MmRebalanceMemoryConsumers();
/* Call RosMm and see if it can release any pages for us */
MmRebalanceMemoryConsumers();
/* Check if we're running low on pages */
if (MmAvailablePages < 128)
{
/* Check if we're running low on pages */
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);
// Get the page bit count
//
i = ((SizeInPages - 1) / PTE_COUNT) + 1;
// Get the page bit count
//
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
/* Get the session ID */
SessionId = SessionGlobal->SessionId;
/* Get the session ID */
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 */
#ifndef _M_AMD64
/* Free the session page tables */
#ifndef _M_AMD64
MmSessionSpace->PageTables[PointerPde - MiAddressToPde(MmSessionBase)] = *PointerPde;
#endif
InitializeListHead(&MmSessionSpace->ImageList);
MmSessionSpace->PageTables[PointerPde - MiAddressToPde(MmSessionBase)] = *PointerPde;
#endif
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);
/* Initialize session pool */
*SessionId, MmSessionSpace, SessionGlobal, SessionPageDirIndex, PageTables);
/* Initialize session pool */
{
ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER));
p1 = MmAllocateSpecialPool(ByteSize, 'TEST', PoolType, 0);
{
ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER));
p1 = MmAllocateSpecialPool(ByteSize, 'TEST', PoolType, 0);
- DPRINT1("p1 %p size %d\n", p1, ByteSize);
+ DPRINT1("p1 %p size %lu\n", p1, ByteSize);
{
ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER));
p2[i] = MmAllocateSpecialPool(ByteSize, 'TEST', PoolType, 0);
{
ByteSize = (100 * (i+1)) % (PAGE_SIZE - sizeof(POOL_HEADER));
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++)
{
/* Now swap the pages out */
Status = MiMemoryConsumers[Consumer].Trim(Target, 0, &NrFreedPages);
/* Now swap the pages out */
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))
{
PPHYSICAL_PAGE Pfn1;
INT LookForZeroedPages;
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
PPHYSICAL_PAGE Pfn1;
INT LookForZeroedPages;
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
- DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n",
+ DPRINT("MmDeleteVirtualMapping(%p, %p, %u, %p, %p)\n",
Process, Address, FreePage, WasDirty, Page);
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
Process, Address, FreePage, WasDirty, Page);
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
ULONG oldPdeOffset, PdeOffset;
PULONG Pt = NULL;
ULONG Pte;
ULONG oldPdeOffset, PdeOffset;
PULONG Pt = NULL;
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);
ASSERT(((ULONG_PTR)Address % PAGE_SIZE) == 0);
Process, Address, flProtect, Pages, *Pages, PageCount);
ASSERT(((ULONG_PTR)Address % PAGE_SIZE) == 0);
if (!(Attributes & PA_PRESENT) && Pages[i] != 0)
{
DPRINT1("Setting physical address but not allowing access at address "
if (!(Attributes & PA_PRESENT) && Pages[i] != 0)
{
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);
KeBugCheck(MEMORY_MANAGEMENT);
}
Addr, Attributes, flProtect);
KeBugCheck(MEMORY_MANAGEMENT);
}
- DPRINT("MmSetPageProtect(Process %x Address %x flProtect %x)\n",
+ DPRINT("MmSetPageProtect(Process %p Address %p flProtect %x)\n",
Process, Address, flProtect);
Attributes = ProtectToPTE(flProtect);
Process, Address, flProtect);
Attributes = ProtectToPTE(flProtect);
PHYSICAL_ADDRESS p;
ULONG Pte;
PHYSICAL_ADDRESS p;
ULONG Pte;
- DPRINT("MmGetPhysicalAddress(vaddr %x)\n", vaddr);
+ DPRINT("MmGetPhysicalAddress(vaddr %p)\n", vaddr);
Pte = MmGetPageEntryForProcess(NULL, vaddr);
if (Pte != 0 && (Pte & PA_PRESENT))
{
Pte = MmGetPageEntryForProcess(NULL, vaddr);
if (Pte != 0 && (Pte & PA_PRESENT))
{
PVOID Address;
PMEMORY_AREA MemoryArea;
PVOID Address;
PMEMORY_AREA MemoryArea;
- DPRINT("MmDeleteProcessAddressSpace(Process %x (%s))\n", Process,
+ DPRINT("MmDeleteProcessAddressSpace(Process %p (%s))\n", Process,
Process->ImageFileName);
#ifndef _M_AMD64
Process->ImageFileName);
#ifndef _M_AMD64
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);
}
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);
}
* bytes) to the physical location of cluster 3042 then. */
if (BytesPerAllocationUnit % PAGE_SIZE)
{
* bytes) to the physical location of cluster 3042 then. */
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);
ZwClose(FileHandle);
return STATUS_UNSUCCESSFUL;
BytesPerAllocationUnit, PAGE_SIZE);
ZwClose(FileHandle);
return STATUS_UNSUCCESSFUL;
ZwClose(FileHandle);
return(STATUS_NO_MEMORY);
}
ZwClose(FileHandle);
return(STATUS_NO_MEMORY);
}
- DPRINT("ExtentCount: %d\n", ExtentCount);
+ DPRINT("ExtentCount: %lu\n", ExtentCount);
Size = sizeof(RETRIEVAL_POINTERS_BUFFER) + ExtentCount * 2 * sizeof(LARGE_INTEGER);
PagingFile->RetrievalPointers = ExAllocatePool(NonPagedPool, Size);
if (PagingFile->RetrievalPointers == NULL)
Size = sizeof(RETRIEVAL_POINTERS_BUFFER) + ExtentCount * 2 * sizeof(LARGE_INTEGER);
PagingFile->RetrievalPointers = ExAllocatePool(NonPagedPool, Size);
if (PagingFile->RetrievalPointers == NULL)
#undef MmSetPageEntrySectionSegment
#define MmSetPageEntrySectionSegment(S,O,E) do { \
#undef MmSetPageEntrySectionSegment
#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__); \
} while (0)
_MmSetPageEntrySectionSegment((S),(O),(E),__FILE__,__LINE__); \
} while (0)
{
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);
KeBugCheck(MEMORY_MANAGEMENT);
}
SectionSegments[i].ReferenceCount);
KeBugCheck(MEMORY_MANAGEMENT);
}
- 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
MmUnlockAddressSpace(AddressSpace);
MiWaitForPageEvent(NULL, NULL);
MmLockAddressSpace(AddressSpace);
MmUnlockAddressSpace(AddressSpace);
MiWaitForPageEvent(NULL, NULL);
MmLockAddressSpace(AddressSpace);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_MM_RESTART_OPERATION);
}
return(STATUS_MM_RESTART_OPERATION);
}
* Finish the operation
*/
MiSetPageEvent(Process, Address);
* Finish the operation
*/
MiSetPageEvent(Process, Address);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS);
}
return(STATUS_SUCCESS);
}
* Cleanup and release locks
*/
MiSetPageEvent(Process, Address);
* Cleanup and release locks
*/
MiSetPageEvent(Process, Address);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS);
}
return(STATUS_SUCCESS);
}
*/
MmLockAddressSpace(AddressSpace);
MiSetPageEvent(Process, Address);
*/
MmLockAddressSpace(AddressSpace);
MiSetPageEvent(Process, Address);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address);
MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS);
}
else if (IS_SWAP_FROM_SSE(Entry))
return(STATUS_SUCCESS);
}
else if (IS_SWAP_FROM_SSE(Entry))
}
MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address);
}
MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS);
}
else
return(STATUS_SUCCESS);
}
else
}
MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address);
}
MmInsertRmap(Page, Process, Address);
MiSetPageEvent(Process, Address);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS);
}
}
return(STATUS_SUCCESS);
}
}
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
SWAPENTRY SwapEntry;
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
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
*/
if (MmGetPageProtect(Process, Address) & PAGE_READWRITE)
{
/*
* Check if the page has already been set 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);
}
(Region->Protect == PAGE_READWRITE ||
Region->Protect == PAGE_EXECUTE_READWRITE)))
{
(Region->Protect == PAGE_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);
}
* Restart the operation
*/
MmLockAddressSpace(AddressSpace);
* Restart the operation
*/
MmLockAddressSpace(AddressSpace);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_MM_RESTART_OPERATION);
}
return(STATUS_MM_RESTART_OPERATION);
}
MmUnlockSectionSegment(Segment);
MiSetPageEvent(Process, Address);
MmUnlockSectionSegment(Segment);
MiSetPageEvent(Process, Address);
- DPRINT("Address 0x%.8X\n", Address);
+ DPRINT("Address 0x%p\n", Address);
return(STATUS_SUCCESS);
}
return(STATUS_SUCCESS);
}
*/
if (Context.Section->AllocationAttributes & SEC_PHYSICALMEMORY)
{
*/
if (Context.Section->AllocationAttributes & SEC_PHYSICALMEMORY)
{
- DPRINT1("Trying to page out from physical memory section address 0x%X "
- "process %d\n", Address,
+ DPRINT1("Trying to page out from physical memory section address 0x%p "
+ "process %p\n", Address,
Process ? Process->UniqueProcessId : 0);
KeBugCheck(MEMORY_MANAGEMENT);
}
Process ? Process->UniqueProcessId : 0);
KeBugCheck(MEMORY_MANAGEMENT);
}
*/
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);
KeBugCheck(MEMORY_MANAGEMENT);
}
Process ? Process->UniqueProcessId : 0, Address);
KeBugCheck(MEMORY_MANAGEMENT);
}
*/
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));
MmSetPageEntrySectionSegment(Context.Segment, &Context.Offset, Entry);
MmUnlockSectionSegment(Context.Segment);
Page, MmGetReferenceCountPage(Page));
MmSetPageEntrySectionSegment(Context.Segment, &Context.Offset, Entry);
MmUnlockSectionSegment(Context.Segment);
- 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);
KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address, 0);
}
Context.WasDirty ? "dirty" : "clean", Address);
KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address, 0);
}
- 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);
KeBugCheckEx(MEMORY_MANAGEMENT, Page, (ULONG_PTR)Process, (ULONG_PTR)Address, 0);
}
Context.WasDirty ? "dirty" : "clean", Address);
KeBugCheckEx(MEMORY_MANAGEMENT, Page, (ULONG_PTR)Process, (ULONG_PTR)Address, 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);
KeBugCheckEx(MEMORY_MANAGEMENT, STATUS_UNSUCCESSFUL, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address);
}
Address);
KeBugCheckEx(MEMORY_MANAGEMENT, STATUS_UNSUCCESSFUL, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address);
}
- 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);
KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, Page, (ULONG_PTR)Process, (ULONG_PTR)Address);
}
Address);
KeBugCheckEx(MEMORY_MANAGEMENT, SwapEntry, Page, (ULONG_PTR)Process, (ULONG_PTR)Address);
}
*/
if (Section->AllocationAttributes & SEC_PHYSICALMEMORY)
{
*/
if (Section->AllocationAttributes & SEC_PHYSICALMEMORY)
{
- DPRINT1("Trying to write back page from physical memory mapped at %X "
- "process %d\n", Address,
+ DPRINT1("Trying to write back page from physical memory mapped at %p "
+ "process %p\n", Address,
Process ? Process->UniqueProcessId : 0);
KeBugCheck(MEMORY_MANAGEMENT);
}
Process ? Process->UniqueProcessId : 0);
KeBugCheck(MEMORY_MANAGEMENT);
}
Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
if (!MmIsPagePresent(Process, Address))
{
Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
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);
KeBugCheck(MEMORY_MANAGEMENT);
}
Process ? Process->UniqueProcessId : 0, Address);
KeBugCheck(MEMORY_MANAGEMENT);
}
IN ULONG ProcessHandleCount,
IN ULONG SystemHandleCount)
{
IN ULONG ProcessHandleCount,
IN ULONG SystemHandleCount)
{
- DPRINT("MmpCloseSection(OB %x, HC %d)\n",
- Object, ProcessHandleCount);
+ DPRINT("MmpCloseSection(OB %p, HC %lu)\n", Object, ProcessHandleCount);
BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
BoundaryAddressMultiple);
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);
return(Status);
}
(*BaseAddress), (char*)(*BaseAddress) + ViewSize, Status);
return(Status);
}
PROS_SECTION_OBJECT Section;
PVOID ImageBaseAddress = 0;
PROS_SECTION_OBJECT Section;
PVOID ImageBaseAddress = 0;
- DPRINT("Opening memory area Process %x BaseAddress %x\n",
+ DPRINT("Opening memory area Process %p BaseAddress %p\n",
Process, BaseAddress);
ASSERT(Process);
Process, BaseAddress);
ASSERT(Process);
(Parent != Context->Directory))
{
/* Invalid context */
(Parent != Context->Directory))
{
/* Invalid context */
- DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %ld\n",
+ DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %u\n",
Context, Context->DirectoryLocked);
ASSERT(FALSE);
return FALSE;
Context, Context->DirectoryLocked);
ASSERT(FALSE);
return FALSE;
Body = &ObjectHeader->Body;
GrantedAccess = HandleEntry->GrantedAccess;
OBTRACE(OB_HANDLE_DEBUG,
Body = &ObjectHeader->Body;
GrantedAccess = HandleEntry->GrantedAccess;
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__,
Handle,
Body,
__FUNCTION__,
Handle,
Body,
/* Return to caller */
OBTRACE(OB_HANDLE_DEBUG,
/* Return to caller */
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Closed handle: %lx for %p.\n",
+ "%s - Closed handle: %p for %p.\n",
__FUNCTION__,
Handle,
Body);
__FUNCTION__,
Handle,
Body);
/* Trace and return */
OBTRACE(OB_HANDLE_DEBUG,
/* Trace and return */
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Returning Handle: %lx HC PC %lx %lx\n",
+ "%s - Returning Handle: %p HC PC %lx %lx\n",
__FUNCTION__,
Handle,
ObjectHeader->HandleCount,
__FUNCTION__,
Handle,
ObjectHeader->HandleCount,
/* Trace and return */
OBTRACE(OB_HANDLE_DEBUG,
/* Trace and return */
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Returning Handle: %lx HC PC %lx %lx\n",
+ "%s - Returning Handle: %p HC PC %lx %lx\n",
__FUNCTION__,
Handle,
ObjectHeader->HandleCount,
__FUNCTION__,
Handle,
ObjectHeader->HandleCount,
PEPROCESS Process = PsGetCurrentProcess();
PAGED_CODE();
OBTRACE(OB_HANDLE_DEBUG,
PEPROCESS Process = PsGetCurrentProcess();
PAGED_CODE();
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Closing handle: %lx\n", __FUNCTION__, Handle);
+ "%s - Closing handle: %p\n", __FUNCTION__, Handle);
if (AccessMode == KernelMode && Handle == (HANDLE)-1)
return STATUS_INVALID_HANDLE;
if (AccessMode == KernelMode && Handle == (HANDLE)-1)
return STATUS_INVALID_HANDLE;
/* Return status */
OBTRACE(OB_HANDLE_DEBUG,
/* Return status */
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Closed handle: %lx S: %lx\n",
+ "%s - Closed handle: %p S: %lx\n",
__FUNCTION__, Handle, Status);
return Status;
}
__FUNCTION__, Handle, Status);
return Status;
}
ULONG AuditMask;
PAGED_CODE();
OBTRACE(OB_HANDLE_DEBUG,
ULONG AuditMask;
PAGED_CODE();
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Duplicating handle: %lx for %p into %p\n",
+ "%s - Duplicating handle: %p for %p into %p\n",
__FUNCTION__,
SourceHandle,
SourceProcess,
__FUNCTION__,
SourceHandle,
SourceProcess,
/* Return status */
OBTRACE(OB_HANDLE_DEBUG,
/* Return status */
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__,
NewHandle,
SourceProcess,
__FUNCTION__,
NewHandle,
SourceProcess,
if (!(ObjectHeader->Flags & OB_FLAG_CREATE_INFO))
{
/* Display warning and break into debugger */
if (!(ObjectHeader->Flags & OB_FLAG_CREATE_INFO))
{
/* 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();
/* Allow debugger to continue */
DbgBreakPoint();
/* Allow debugger to continue */
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
OBTRACE(OB_HANDLE_DEBUG,
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status;
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Duplicating handle: %lx for %lx into %lx.\n",
+ "%s - Duplicating handle: %p for %p into %p.\n",
__FUNCTION__,
SourceHandle,
SourceProcessHandle,
__FUNCTION__,
SourceHandle,
SourceProcessHandle,
/* Dereference the processes */
OBTRACE(OB_HANDLE_DEBUG,
/* Dereference the processes */
OBTRACE(OB_HANDLE_DEBUG,
- "%s - Duplicated handle: %lx into %lx S %lx\n",
+ "%s - Duplicated handle: %p into %p S %lx\n",
__FUNCTION__,
hTarget,
TargetProcessHandle,
__FUNCTION__,
hTarget,
TargetProcessHandle,
DriveType = DOSDEVICE_DRIVE_REMOTE;
break;
default:
DriveType = DOSDEVICE_DRIVE_REMOTE;
break;
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,
&SymbolicLink->LinkTarget);
DriveType = DOSDEVICE_DRIVE_UNKNOWN;
((PDEVICE_OBJECT)Object)->DeviceType,
&SymbolicLink->LinkTarget);
DriveType = DOSDEVICE_DRIVE_UNKNOWN;
if ((Process != PsInitialSystemProcess) && (Process != PsIdleProcess))
{
/* Print it */
if ((Process != PsInitialSystemProcess) && (Process != PsIdleProcess))
{
/* 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 */
if (NT_SUCCESS(Status))
{
/* Flush it and close it */
if (NT_SUCCESS(Status))
{
/* Flush it and close it */
- DPRINT1("Sending flush to: %lx\n", VolumeHandle);
+ DPRINT1("Sending flush to: %p\n", VolumeHandle);
ZwFlushBuffersFile(VolumeHandle, &IoStatusBlock);
ZwClose(VolumeHandle);
}
ZwFlushBuffersFile(VolumeHandle, &IoStatusBlock);
ZwClose(VolumeHandle);
}
- DPRINT("NtPowerInformation(PowerInformationLevel 0x%x, InputBuffer 0x%x, "
- "InputBufferLength 0x%x, OutputBuffer 0x%x, OutputBufferLength 0x%x)\n",
+ DPRINT("NtPowerInformation(PowerInformationLevel 0x%x, InputBuffer 0x%p, "
+ "InputBufferLength 0x%x, OutputBuffer 0x%p, OutputBufferLength 0x%x)\n",
PowerInformationLevel,
InputBuffer, InputBufferLength,
OutputBuffer, OutputBufferLength);
PowerInformationLevel,
InputBuffer, InputBufferLength,
OutputBuffer, OutputBufferLength);
#endif
/* Flush all volumes and the registry */
#endif
/* 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);
/* Set IRP for drivers */
PopFlushVolumes(PopAction.Shutdown);
/* Set IRP for drivers */
nThreads++;
/* Print the Info */
nThreads++;
/* 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.Affinity,
Thread->Tcb.Priority,
Thread->Tcb.State,
Thread->Tcb.Affinity,
Thread->Tcb.Priority,
PULONG Ebp = (PULONG)Esp[4];
/* Print EBP */
PULONG Ebp = (PULONG)Esp[4];
/* Print EBP */
- DbgPrint("Ebp 0x%.8X\n", Ebp);
+ DbgPrint("Ebp %p\n", Ebp);
/* Walk it */
while(Ebp != 0 && Ebp >= (PULONG)Thread->Tcb.StackLimit)
/* Walk it */
while(Ebp != 0 && Ebp >= (PULONG)Thread->Tcb.StackLimit)
NTSTATUS Status = STATUS_NOTHING_TO_TERMINATE;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
NTSTATUS Status = STATUS_NOTHING_TO_TERMINATE;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
- "Process: %p ExitStatus: %p\n", Process, ExitStatus);
+ "Process: %p ExitStatus: %d\n", Process, ExitStatus);
PSREFTRACE(Process);
/* Check if this is a Critical Process */
PSREFTRACE(Process);
/* Check if this is a Critical Process */
PKAPC Apc;
PTOKEN PrimaryToken;
PAGED_CODE();
PKAPC Apc;
PTOKEN PrimaryToken;
PAGED_CODE();
- PSTRACE(PS_KILL_DEBUG, "ExitStatus: %p\n", ExitStatus);
+ PSTRACE(PS_KILL_DEBUG, "ExitStatus: %d\n", ExitStatus);
/* Get the Current Thread and Process */
Thread = PsGetCurrentThread();
/* Get the Current Thread and Process */
Thread = PsGetCurrentThread();
NTSTATUS Status = STATUS_SUCCESS;
ULONG Flags;
PAGED_CODE();
NTSTATUS Status = STATUS_SUCCESS;
ULONG Flags;
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);
/* Check if this is a Critical Thread, and Bugcheck */
PSREFTRACE(Thread);
/* Check if this is a Critical Thread, and Bugcheck */
ULONG Actual;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
ULONG Actual;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
- "LastThread: %p Process: %p\n", LastThread, Process);
+ "LastThread: %u Process: %p\n", LastThread, Process);
PSREFTRACE(Process);
/* Set Process Exit flag */
PSREFTRACE(Process);
/* Set Process Exit flag */
BOOLEAN KillByHandle;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
BOOLEAN KillByHandle;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
- "ProcessHandle: %p ExitStatus: %p\n", ProcessHandle, ExitStatus);
+ "ProcessHandle: %p ExitStatus: %d\n", ProcessHandle, ExitStatus);
/* Were we passed a process handle? */
if (ProcessHandle)
/* Were we passed a process handle? */
if (ProcessHandle)
NTSTATUS Status;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
NTSTATUS Status;
PAGED_CODE();
PSTRACE(PS_KILL_DEBUG,
- "ThreadHandle: %p ExitStatus: %p\n", ThreadHandle, ExitStatus);
+ "ThreadHandle: %p ExitStatus: %d\n", ThreadHandle, ExitStatus);
/* Handle the special NULL case */
if (!ThreadHandle)
/* Handle the special NULL case */
if (!ThreadHandle)
{
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());
Length = sizeof(SECURITY_DESCRIPTOR_RELATIVE) +
OwnerLength + GroupLength + DaclLength + SaclLength;
Length = sizeof(SECURITY_DESCRIPTOR_RELATIVE) +
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),
OwnerLength,
GroupLength,
sizeof(SECURITY_DESCRIPTOR),
OwnerLength,
GroupLength,
RtlCopyMemory((PUCHAR)Descriptor + Current, Owner, OwnerLength);
Descriptor->Owner = Current;
Current += OwnerLength;
RtlCopyMemory((PUCHAR)Descriptor + Current, Owner, OwnerLength);
Descriptor->Owner = Current;
Current += OwnerLength;
- DPRINT("Owner of %x at %x\n", Descriptor, Descriptor->Owner);
+ DPRINT("Owner of %p at %x\n", Descriptor, Descriptor->Owner);
- DPRINT("Owner of %x is zero length\n", Descriptor);
+ DPRINT("Owner of %p is zero length\n", Descriptor);
*NewDescriptor = Descriptor;
*NewDescriptor = Descriptor;
- DPRINT("Descrptor %x\n", Descriptor);
+ DPRINT("Descrptor %p\n", Descriptor);
ASSERT(RtlLengthSecurityDescriptor(Descriptor));
return STATUS_SUCCESS;
ASSERT(RtlLengthSecurityDescriptor(Descriptor));
return STATUS_SUCCESS;
(PVOID*)&AccessToken);
if (!NT_SUCCESS(Status))
{
(PVOID*)&AccessToken);
if (!NT_SUCCESS(Status))
{
- DPRINT1("ObCreateObject() failed (Status %lx)\n");
+ DPRINT1("ObCreateObject() failed (Status %lx)\n", Status);
IoWMIRegistrationControl(IN PDEVICE_OBJECT DeviceObject,
IN ULONG Action)
{
IoWMIRegistrationControl(IN PDEVICE_OBJECT DeviceObject,
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);
return STATUS_SUCCESS;
DeviceObject, Action);
return STATUS_SUCCESS;