Kernel/mmap, munmap: Use %p in printf
This commit is contained in:
parent
d5f59b666a
commit
3feb7782bc
@ -21,7 +21,7 @@ void sys_mmap(Context* context, void* address, size_t size, int flags)
|
||||
if (flags & MAP_READ_WRITE) real_flags |= MAP_READ_WRITE;
|
||||
if (address)
|
||||
{
|
||||
kdbgln("sys_mmap: %ld pages at address %lx, %s", size / PAGE_SIZE, (uint64_t)address,
|
||||
kdbgln("sys_mmap: %ld pages at address %p, %s", size / PAGE_SIZE, address,
|
||||
real_flags & MAP_READ_WRITE ? "rw" : "ro");
|
||||
if (kernelVMM.getPhysical((uint64_t)address) != (uint64_t)-1) // Address is already used.
|
||||
{
|
||||
@ -33,7 +33,7 @@ void sys_mmap(Context* context, void* address, size_t size, int flags)
|
||||
void* result = MemoryManager::get_pages_at((uint64_t)address - offset, size / PAGE_SIZE, real_flags);
|
||||
if (result)
|
||||
{
|
||||
kdbgln("mmap succeeded: %lx", (uint64_t)result);
|
||||
kdbgln("mmap succeeded: %p", result);
|
||||
context->rax = (uint64_t)result;
|
||||
return;
|
||||
}
|
||||
@ -48,7 +48,7 @@ void sys_mmap(Context* context, void* address, size_t size, int flags)
|
||||
void* result = MemoryManager::get_pages(size / PAGE_SIZE, real_flags);
|
||||
if (result)
|
||||
{
|
||||
kdbgln("mmap succeeded: %lx", (uint64_t)result);
|
||||
kdbgln("mmap succeeded: %p", result);
|
||||
context->rax = (uint64_t)result;
|
||||
return;
|
||||
}
|
||||
@ -62,7 +62,7 @@ void sys_mmap(Context* context, void* address, size_t size, int flags)
|
||||
|
||||
void sys_munmap(Context* context, void* address, size_t size)
|
||||
{
|
||||
kdbgln("sys_munmap: attempting to unmap %lx", (uint64_t)address);
|
||||
kdbgln("sys_munmap: attempting to unmap %p", address);
|
||||
if (size < PAGE_SIZE)
|
||||
{
|
||||
kdbgln("munmap failed: size is too small");
|
||||
|
Loading…
Reference in New Issue
Block a user