2018-01-13 21:22:39 +00:00
|
|
|
// Copyright 2018 yuzu emulator team
|
2017-05-21 07:11:36 +00:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "core/hle/result.h"
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
namespace ErrCodes {
|
|
|
|
enum {
|
2018-01-09 17:05:10 +00:00
|
|
|
// Confirmed Switch OS error codes
|
2018-08-25 10:15:58 +00:00
|
|
|
MaxConnectionsReached = 7,
|
2018-09-13 23:09:04 +00:00
|
|
|
InvalidSize = 101,
|
2018-06-21 06:49:43 +00:00
|
|
|
InvalidAddress = 102,
|
2018-08-25 09:44:51 +00:00
|
|
|
HandleTableFull = 105,
|
2018-06-21 06:49:43 +00:00
|
|
|
InvalidMemoryState = 106,
|
2018-08-25 09:40:42 +00:00
|
|
|
InvalidMemoryPermissions = 108,
|
2018-10-10 18:18:27 +00:00
|
|
|
InvalidMemoryRange = 110,
|
2018-09-12 08:25:53 +00:00
|
|
|
InvalidThreadPriority = 112,
|
2018-05-30 17:03:19 +00:00
|
|
|
InvalidProcessorId = 113,
|
2018-01-09 17:05:10 +00:00
|
|
|
InvalidHandle = 114,
|
2018-10-24 17:38:34 +00:00
|
|
|
InvalidPointer = 115,
|
2018-05-30 17:03:19 +00:00
|
|
|
InvalidCombination = 116,
|
2018-01-09 17:05:10 +00:00
|
|
|
Timeout = 117,
|
2018-01-09 20:02:04 +00:00
|
|
|
SynchronizationCanceled = 118,
|
|
|
|
TooLarge = 119,
|
2018-06-21 06:49:43 +00:00
|
|
|
InvalidEnumValue = 120,
|
2018-09-13 21:08:00 +00:00
|
|
|
NoSuchEntry = 121,
|
2018-09-29 23:58:21 +00:00
|
|
|
AlreadyRegistered = 122,
|
2018-10-24 17:38:34 +00:00
|
|
|
SessionClosed = 123,
|
2018-06-21 07:40:29 +00:00
|
|
|
InvalidState = 125,
|
2018-08-25 10:15:58 +00:00
|
|
|
ResourceLimitExceeded = 132,
|
2017-05-21 07:11:36 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// WARNING: The kernel is quite inconsistent in it's usage of errors code. Make sure to always
|
|
|
|
// double check that the code matches before re-using the constant.
|
|
|
|
|
2018-08-25 09:44:51 +00:00
|
|
|
constexpr ResultCode ERR_HANDLE_TABLE_FULL(ErrorModule::Kernel, ErrCodes::HandleTableFull);
|
2018-10-24 17:38:34 +00:00
|
|
|
constexpr ResultCode ERR_SESSION_CLOSED_BY_REMOTE(ErrorModule::Kernel, ErrCodes::SessionClosed);
|
2018-08-25 09:52:57 +00:00
|
|
|
constexpr ResultCode ERR_PORT_NAME_TOO_LONG(ErrorModule::Kernel, ErrCodes::TooLarge);
|
2018-08-25 10:15:58 +00:00
|
|
|
constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(ErrorModule::Kernel,
|
|
|
|
ErrCodes::MaxConnectionsReached);
|
2018-06-21 06:49:43 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_ENUM_VALUE(ErrorModule::Kernel, ErrCodes::InvalidEnumValue);
|
2018-08-25 09:37:37 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_COMBINATION_KERNEL(ErrorModule::Kernel,
|
|
|
|
ErrCodes::InvalidCombination);
|
2018-06-21 06:49:43 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_ADDRESS(ErrorModule::Kernel, ErrCodes::InvalidAddress);
|
|
|
|
constexpr ResultCode ERR_INVALID_ADDRESS_STATE(ErrorModule::Kernel, ErrCodes::InvalidMemoryState);
|
2018-08-25 09:40:42 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_MEMORY_PERMISSIONS(ErrorModule::Kernel,
|
|
|
|
ErrCodes::InvalidMemoryPermissions);
|
2018-10-10 18:18:27 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_MEMORY_RANGE(ErrorModule::Kernel, ErrCodes::InvalidMemoryRange);
|
2018-01-09 17:05:10 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_HANDLE(ErrorModule::Kernel, ErrCodes::InvalidHandle);
|
2018-09-12 08:25:53 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_PROCESSOR_ID(ErrorModule::Kernel, ErrCodes::InvalidProcessorId);
|
2018-09-13 23:09:04 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_SIZE(ErrorModule::Kernel, ErrCodes::InvalidSize);
|
2018-09-29 23:58:21 +00:00
|
|
|
constexpr ResultCode ERR_ALREADY_REGISTERED(ErrorModule::Kernel, ErrCodes::AlreadyRegistered);
|
2018-06-21 07:40:29 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_STATE(ErrorModule::Kernel, ErrCodes::InvalidState);
|
2018-09-12 08:25:53 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_THREAD_PRIORITY(ErrorModule::Kernel,
|
|
|
|
ErrCodes::InvalidThreadPriority);
|
2018-10-24 17:41:09 +00:00
|
|
|
constexpr ResultCode ERR_INVALID_POINTER(ErrorModule::Kernel, ErrCodes::InvalidPointer);
|
2018-09-13 21:08:00 +00:00
|
|
|
constexpr ResultCode ERR_NOT_FOUND(ErrorModule::Kernel, ErrCodes::NoSuchEntry);
|
2018-01-09 17:05:10 +00:00
|
|
|
constexpr ResultCode RESULT_TIMEOUT(ErrorModule::Kernel, ErrCodes::Timeout);
|
2017-05-21 07:11:36 +00:00
|
|
|
|
|
|
|
} // namespace Kernel
|