summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-25 11:40:42 +0200
committerLioncash <mathew1800@gmail.com>2018-08-25 15:40:12 +0200
commitb8be5524bc3fd9c1d31a4a56cb321840c42ef0bb (patch)
tree16eb07e5639804668e520707beebeebc90105d04
parentkernel/error: Correct kernel error code for invalid combination (diff)
downloadyuzu-b8be5524bc3fd9c1d31a4a56cb321840c42ef0bb.tar
yuzu-b8be5524bc3fd9c1d31a4a56cb321840c42ef0bb.tar.gz
yuzu-b8be5524bc3fd9c1d31a4a56cb321840c42ef0bb.tar.bz2
yuzu-b8be5524bc3fd9c1d31a4a56cb321840c42ef0bb.tar.lz
yuzu-b8be5524bc3fd9c1d31a4a56cb321840c42ef0bb.tar.xz
yuzu-b8be5524bc3fd9c1d31a4a56cb321840c42ef0bb.tar.zst
yuzu-b8be5524bc3fd9c1d31a4a56cb321840c42ef0bb.zip
-rw-r--r--src/core/hle/kernel/errors.h5
-rw-r--r--src/core/hle/kernel/shared_memory.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/kernel/errors.h b/src/core/hle/kernel/errors.h
index c4d9e8ea9..8b4e05191 100644
--- a/src/core/hle/kernel/errors.h
+++ b/src/core/hle/kernel/errors.h
@@ -15,13 +15,13 @@ enum {
SessionClosedByRemote = 26,
PortNameTooLong = 30,
NoPendingSessions = 35,
- WrongPermission = 46,
InvalidBufferDescriptor = 48,
MaxConnectionsReached = 52,
// Confirmed Switch OS error codes
InvalidAddress = 102,
InvalidMemoryState = 106,
+ InvalidMemoryPermissions = 108,
InvalidProcessorId = 113,
InvalidHandle = 114,
InvalidCombination = 116,
@@ -40,7 +40,6 @@ enum {
constexpr ResultCode ERR_OUT_OF_HANDLES(-1);
constexpr ResultCode ERR_SESSION_CLOSED_BY_REMOTE(-1);
constexpr ResultCode ERR_PORT_NAME_TOO_LONG(-1);
-constexpr ResultCode ERR_WRONG_PERMISSION(-1);
constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(-1);
constexpr ResultCode ERR_INVALID_ENUM_VALUE(ErrorModule::Kernel, ErrCodes::InvalidEnumValue);
constexpr ResultCode ERR_INVALID_ENUM_VALUE_FND(-1);
@@ -50,6 +49,8 @@ constexpr ResultCode ERR_INVALID_COMBINATION_KERNEL(ErrorModule::Kernel,
constexpr ResultCode ERR_OUT_OF_MEMORY(-1);
constexpr ResultCode ERR_INVALID_ADDRESS(ErrorModule::Kernel, ErrCodes::InvalidAddress);
constexpr ResultCode ERR_INVALID_ADDRESS_STATE(ErrorModule::Kernel, ErrCodes::InvalidMemoryState);
+constexpr ResultCode ERR_INVALID_MEMORY_PERMISSIONS(ErrorModule::Kernel,
+ ErrCodes::InvalidMemoryPermissions);
constexpr ResultCode ERR_INVALID_HANDLE(ErrorModule::Kernel, ErrCodes::InvalidHandle);
constexpr ResultCode ERR_INVALID_STATE(ErrorModule::Kernel, ErrCodes::InvalidState);
constexpr ResultCode ERR_INVALID_POINTER(-1);
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index 21ddc2f7d..fc168d2b5 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -101,7 +101,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) {
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:X} name={}, permissions don't match",
GetObjectId(), address, name);
- return ERR_WRONG_PERMISSION;
+ return ERR_INVALID_MEMORY_PERMISSIONS;
}
VAddr target_address = address;