From 5fe1dacee28265af5ed8272a3c9921904d6f50fe Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 23 May 2019 02:50:59 -0700 Subject: [PATCH] Add prodinfo blank flag wrapper --- include/stratosphere/utilities.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/stratosphere/utilities.hpp b/include/stratosphere/utilities.hpp index 377dd7fd..98ccdccf 100644 --- a/include/stratosphere/utilities.hpp +++ b/include/stratosphere/utilities.hpp @@ -101,6 +101,23 @@ static inline bool IsRcmBugPatched() { return rcm_bug_patched; } +static inline Result GetShouldBlankProdInfo(bool *out) { + u64 tmp = 0; + Result rc = SmcGetConfig((SplConfigItem)65005, &tmp); + if (R_SUCCEEDED(rc)) { + *out = (tmp != 0); + } + return rc; +} + +static inline bool ShouldBlankProdInfo() { + bool should_blank_prodinfo; + if (R_FAILED(GetShouldBlankProdInfo(&should_blank_prodinfo))) { + std::abort(); + } + return should_blank_prodinfo; +} + HosRecursiveMutex &GetSmSessionMutex(); HosRecursiveMutex &GetSmMitmSessionMutex();