From 5be736876c4f247f137464857f4052c94891d462 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 28 Mar 2019 22:44:49 -0700 Subject: [PATCH] libstrat: remove remaining IPC magic numbers --- include/stratosphere/ipc/ipc_serialization.hpp | 4 ++-- include/stratosphere/results/sf_results.hpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/stratosphere/ipc/ipc_serialization.hpp b/include/stratosphere/ipc/ipc_serialization.hpp index 095e6b28..a62a12a0 100644 --- a/include/stratosphere/ipc/ipc_serialization.hpp +++ b/include/stratosphere/ipc/ipc_serialization.hpp @@ -576,7 +576,7 @@ constexpr Result WrapIpcCommandImpl(IpcResponseContext *ctx) { Result rc = Validator::Validate(ctx); if (R_FAILED(rc)) { - return 0xAAEE; + return rc; } ClassType *this_ptr = nullptr; @@ -586,7 +586,7 @@ constexpr Result WrapIpcCommandImpl(IpcResponseContext *ctx) { this_ptr = ctx->obj_holder->GetServiceObject(); } if (this_ptr == nullptr) { - return 0xBBEE; + return ResultServiceFrameworkTargetNotFound; } std::shared_ptr out_objects[CommandMetaData::NumOutSessions]; diff --git a/include/stratosphere/results/sf_results.hpp b/include/stratosphere/results/sf_results.hpp index e02bfc35..e7670ff4 100644 --- a/include/stratosphere/results/sf_results.hpp +++ b/include/stratosphere/results/sf_results.hpp @@ -19,6 +19,8 @@ static constexpr u32 Module_ServiceFramework = 10; +static constexpr Result ResultServiceFrameworkTargetNotFound = MAKERESULT(Module_ServiceFramework, 261); + static constexpr Result ResultServiceFrameworkOutOfDomainEntries = MAKERESULT(Module_ServiceFramework, 301);