summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-24 20:54:32 +0200
committerLioncash <mathew1800@gmail.com>2018-10-24 20:54:36 +0200
commit239dfea34a08fc370028de96dc094cca66f6e961 (patch)
tree3247a22b8f823d9fe2d00e37d247880f56d44661 /src/core/hle
parentkernel/server_port: Simplify emptiness check within ShouldWait() (diff)
downloadyuzu-239dfea34a08fc370028de96dc094cca66f6e961.tar
yuzu-239dfea34a08fc370028de96dc094cca66f6e961.tar.gz
yuzu-239dfea34a08fc370028de96dc094cca66f6e961.tar.bz2
yuzu-239dfea34a08fc370028de96dc094cca66f6e961.tar.lz
yuzu-239dfea34a08fc370028de96dc094cca66f6e961.tar.xz
yuzu-239dfea34a08fc370028de96dc094cca66f6e961.tar.zst
yuzu-239dfea34a08fc370028de96dc094cca66f6e961.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/shared_memory.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index d061e6155..a016a86b6 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -80,20 +80,19 @@ SharedPtr<SharedMemory> SharedMemory::CreateForApplet(
ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermission permissions,
MemoryPermission other_permissions) {
-
- MemoryPermission own_other_permissions =
+ const MemoryPermission own_other_permissions =
target_process == owner_process ? this->permissions : this->other_permissions;
// Automatically allocated memory blocks can only be mapped with other_permissions = DontCare
if (base_address == 0 && other_permissions != MemoryPermission::DontCare) {
- return ERR_INVALID_COMBINATION;
+ return ERR_INVALID_MEMORY_PERMISSIONS;
}
// 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={}, address=0x{:X} name={}, permissions don't match",
GetObjectId(), address, name);
- return ERR_INVALID_COMBINATION;
+ return ERR_INVALID_MEMORY_PERMISSIONS;
}
// Error out if the provided permissions are not compatible with what the creator process needs.