diff options
| author | 2018-10-24 14:55:55 -0400 | |
|---|---|---|
| committer | 2018-10-24 14:58:37 -0400 | |
| commit | 1fb4bebb63e2824c71259bc72b809d6c2bf48ca9 (patch) | |
| tree | 4800663d5a6ed8fe989834c95bcd04e15d2e0708 /src | |
| parent | kernel/shared_memory: Return ERR_INVALID_MEMORY_PERMISSIONS instead of ERR_IN... (diff) | |
| download | yuzu-1fb4bebb63e2824c71259bc72b809d6c2bf48ca9.tar.gz yuzu-1fb4bebb63e2824c71259bc72b809d6c2bf48ca9.tar.xz yuzu-1fb4bebb63e2824c71259bc72b809d6c2bf48ca9.zip | |
kernel/errors: Remove now-unused, unnecessary, error codes
Now that we've gotten the innaccurate error codes out of the way, we can
finally toss away a bunch of these, trimming down the error codes to
ones that are actually used and knocking out two TODO comments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/ipc.h | 5 | ||||
| -rw-r--r-- | src/core/hle/kernel/errors.h | 8 |
2 files changed, 0 insertions, 13 deletions
diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.h index 419f45896..ed84197b3 100644 --- a/src/core/hle/ipc.h +++ b/src/core/hle/ipc.h | |||
| @@ -14,11 +14,6 @@ namespace IPC { | |||
| 14 | /// Size of the command buffer area, in 32-bit words. | 14 | /// Size of the command buffer area, in 32-bit words. |
| 15 | constexpr std::size_t COMMAND_BUFFER_LENGTH = 0x100 / sizeof(u32); | 15 | constexpr std::size_t COMMAND_BUFFER_LENGTH = 0x100 / sizeof(u32); |
| 16 | 16 | ||
| 17 | // These errors are commonly returned by invalid IPC translations, so alias them here for | ||
| 18 | // convenience. | ||
| 19 | // TODO(yuriks): These will probably go away once translation is implemented inside the kernel. | ||
| 20 | constexpr auto ERR_INVALID_HANDLE = Kernel::ERR_INVALID_HANDLE_OS; | ||
| 21 | |||
| 22 | enum class ControlCommand : u32 { | 17 | enum class ControlCommand : u32 { |
| 23 | ConvertSessionToDomain = 0, | 18 | ConvertSessionToDomain = 0, |
| 24 | ConvertDomainToSession = 1, | 19 | ConvertDomainToSession = 1, |
diff --git a/src/core/hle/kernel/errors.h b/src/core/hle/kernel/errors.h index 92436ae6d..ee698c8a7 100644 --- a/src/core/hle/kernel/errors.h +++ b/src/core/hle/kernel/errors.h | |||
| @@ -38,18 +38,14 @@ enum { | |||
| 38 | // WARNING: The kernel is quite inconsistent in it's usage of errors code. Make sure to always | 38 | // WARNING: The kernel is quite inconsistent in it's usage of errors code. Make sure to always |
| 39 | // double check that the code matches before re-using the constant. | 39 | // double check that the code matches before re-using the constant. |
| 40 | 40 | ||
| 41 | // TODO(bunnei): Replace -1 with correct errors for Switch OS | ||
| 42 | constexpr ResultCode ERR_HANDLE_TABLE_FULL(ErrorModule::Kernel, ErrCodes::HandleTableFull); | 41 | constexpr ResultCode ERR_HANDLE_TABLE_FULL(ErrorModule::Kernel, ErrCodes::HandleTableFull); |
| 43 | constexpr ResultCode ERR_SESSION_CLOSED_BY_REMOTE(ErrorModule::Kernel, ErrCodes::SessionClosed); | 42 | constexpr ResultCode ERR_SESSION_CLOSED_BY_REMOTE(ErrorModule::Kernel, ErrCodes::SessionClosed); |
| 44 | constexpr ResultCode ERR_PORT_NAME_TOO_LONG(ErrorModule::Kernel, ErrCodes::TooLarge); | 43 | constexpr ResultCode ERR_PORT_NAME_TOO_LONG(ErrorModule::Kernel, ErrCodes::TooLarge); |
| 45 | constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(ErrorModule::Kernel, | 44 | constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(ErrorModule::Kernel, |
| 46 | ErrCodes::MaxConnectionsReached); | 45 | ErrCodes::MaxConnectionsReached); |
| 47 | constexpr ResultCode ERR_INVALID_ENUM_VALUE(ErrorModule::Kernel, ErrCodes::InvalidEnumValue); | 46 | constexpr ResultCode ERR_INVALID_ENUM_VALUE(ErrorModule::Kernel, ErrCodes::InvalidEnumValue); |
| 48 | constexpr ResultCode ERR_INVALID_ENUM_VALUE_FND(-1); | ||
| 49 | constexpr ResultCode ERR_INVALID_COMBINATION(-1); | ||
| 50 | constexpr ResultCode ERR_INVALID_COMBINATION_KERNEL(ErrorModule::Kernel, | 47 | constexpr ResultCode ERR_INVALID_COMBINATION_KERNEL(ErrorModule::Kernel, |
| 51 | ErrCodes::InvalidCombination); | 48 | ErrCodes::InvalidCombination); |
| 52 | constexpr ResultCode ERR_OUT_OF_MEMORY(-1); | ||
| 53 | constexpr ResultCode ERR_INVALID_ADDRESS(ErrorModule::Kernel, ErrCodes::InvalidAddress); | 49 | constexpr ResultCode ERR_INVALID_ADDRESS(ErrorModule::Kernel, ErrCodes::InvalidAddress); |
| 54 | constexpr ResultCode ERR_INVALID_ADDRESS_STATE(ErrorModule::Kernel, ErrCodes::InvalidMemoryState); | 50 | constexpr ResultCode ERR_INVALID_ADDRESS_STATE(ErrorModule::Kernel, ErrCodes::InvalidMemoryState); |
| 55 | constexpr ResultCode ERR_INVALID_MEMORY_PERMISSIONS(ErrorModule::Kernel, | 51 | constexpr ResultCode ERR_INVALID_MEMORY_PERMISSIONS(ErrorModule::Kernel, |
| @@ -63,10 +59,6 @@ constexpr ResultCode ERR_INVALID_STATE(ErrorModule::Kernel, ErrCodes::InvalidSta | |||
| 63 | constexpr ResultCode ERR_INVALID_THREAD_PRIORITY(ErrorModule::Kernel, | 59 | constexpr ResultCode ERR_INVALID_THREAD_PRIORITY(ErrorModule::Kernel, |
| 64 | ErrCodes::InvalidThreadPriority); | 60 | ErrCodes::InvalidThreadPriority); |
| 65 | constexpr ResultCode ERR_INVALID_POINTER(ErrorModule::Kernel, ErrCodes::InvalidPointer); | 61 | constexpr ResultCode ERR_INVALID_POINTER(ErrorModule::Kernel, ErrCodes::InvalidPointer); |
| 66 | constexpr ResultCode ERR_INVALID_OBJECT_ADDR(-1); | ||
| 67 | constexpr ResultCode ERR_NOT_AUTHORIZED(-1); | ||
| 68 | /// Alternate code returned instead of ERR_INVALID_HANDLE in some code paths. | ||
| 69 | constexpr ResultCode ERR_INVALID_HANDLE_OS(-1); | ||
| 70 | constexpr ResultCode ERR_NOT_FOUND(ErrorModule::Kernel, ErrCodes::NoSuchEntry); | 62 | constexpr ResultCode ERR_NOT_FOUND(ErrorModule::Kernel, ErrCodes::NoSuchEntry); |
| 71 | constexpr ResultCode RESULT_TIMEOUT(ErrorModule::Kernel, ErrCodes::Timeout); | 63 | constexpr ResultCode RESULT_TIMEOUT(ErrorModule::Kernel, ErrCodes::Timeout); |
| 72 | 64 | ||