aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/shared_memory.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-25 22:42:34 -0400
committerGitHub <noreply@github.com>2018-04-25 22:42:34 -0400
commit903505ed5fb1b2146fd9b4be3595846279742e05 (patch)
tree1c4b2d5bbf760c4ee1205363ff5f040615d9254b /src/core/hle/kernel/shared_memory.cpp
parent9176319a5c6426ec1a20bb7f038f02acd76eab04 (diff)
parent871e6c0041e21986fa0e760e1ee5cb82fc82c3ce (diff)
Merge pull request #398 from lioncash/kernel
kernel: Migrate logging macros to fmt-compatible ones
Diffstat (limited to 'src/core/hle/kernel/shared_memory.cpp')
-rw-r--r--src/core/hle/kernel/shared_memory.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index bc99993c81..f0b65c73d2 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -107,16 +107,16 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
// Error out if the requested permissions don't match what the creator process allows.
if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) {
- LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match",
- GetObjectId(), address, name.c_str());
+ NGLOG_ERROR(Kernel, "cannot map id={}, address={:#X} name={}, permissions don't match",
+ GetObjectId(), address, name);
return ERR_INVALID_COMBINATION;
}
// Error out if the provided permissions are not compatible with what the creator process needs.
if (other_permissions != MemoryPermission::DontCare &&
static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) {
- LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match",
- GetObjectId(), address, name.c_str());
+ NGLOG_ERROR(Kernel, "cannot map id={}, address={:#X} name={}, permissions don't match",
+ GetObjectId(), address, name);
return ERR_WRONG_PERMISSION;
}
@@ -131,9 +131,10 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
auto result = target_process->vm_manager.MapMemoryBlock(
target_address, backing_block, backing_block_offset, size, MemoryState::Shared);
if (result.Failed()) {
- LOG_ERROR(Kernel,
- "cannot map id=%u, target_address=0x%lx name=%s, error mapping to virtual memory",
- GetObjectId(), target_address, name.c_str());
+ NGLOG_ERROR(
+ Kernel,
+ "cannot map id={}, target_address={:#X} name={}, error mapping to virtual memory",
+ GetObjectId(), target_address, name);
return result.Code();
}
@@ -151,7 +152,7 @@ VMAPermission SharedMemory::ConvertPermissions(MemoryPermission permission) {
u32 masked_permissions =
static_cast<u32>(permission) & static_cast<u32>(MemoryPermission::ReadWriteExecute);
return static_cast<VMAPermission>(masked_permissions);
-};
+}
u8* SharedMemory::GetPointer(u32 offset) {
return backing_block->data() + backing_block_offset + offset;