From 2cdb40d709f2a5d4f7f3159d4c6d80fe7905b4f3 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 21 May 2017 00:11:36 -0700 Subject: Kernel: Centralize error definitions in errors.h --- src/core/hle/ipc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/hle/ipc.h') diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.h index 3a5d481a5..303ca090d 100644 --- a/src/core/hle/ipc.h +++ b/src/core/hle/ipc.h @@ -5,6 +5,7 @@ #pragma once #include "common/common_types.h" +#include "core/hle/kernel/errors.h" #include "core/hle/kernel/thread.h" #include "core/memory.h" @@ -43,6 +44,12 @@ inline u32* GetStaticBuffers(const int offset = 0) { namespace IPC { +// These errors are commonly returned by invalid IPC translations, so alias them here for +// convenience. +// TODO(yuriks): These will probably go away once translation is implemented inside the kernel. +using Kernel::ERR_INVALID_BUFFER_DESCRIPTOR; +constexpr auto ERR_INVALID_HANDLE = Kernel::ERR_INVALID_HANDLE_OS; + enum DescriptorType : u32 { // Buffer related desciptors types (mask : 0x0F) StaticBuffer = 0x02, -- cgit v1.2.3