namespace sts -> namespace ams
namespace sts::ams -> ams::exosphere, ams::. This is to facilitate future use of ams:: namespace code in mesosphere, as we'll want to include ams::util, ams::result, ams::svc...
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "ro_nro_utils.hpp"
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ro.hpp>
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
/* Utilities for working with NROs. */
|
||||
Result MapNro(u64 *out_base_address, Handle process_handle, u64 nro_heap_address, u64 nro_heap_size, u64 bss_heap_address, u64 bss_heap_size);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ro_nrr_utils.hpp"
|
||||
#include "ro_service_impl.hpp"
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ro.hpp>
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
/* Utilities for working with NRRs. */
|
||||
Result MapAndValidateNrr(NrrHeader **out_header, u64 *out_mapped_code_address, Handle process_handle, ncm::TitleId title_id, u64 nrr_heap_address, u64 nrr_heap_size, ModuleType expected_type, bool enforce_type);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "ro_patcher.hpp"
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace sts::ro::impl {
|
||||
|
||||
/* Apply IPS patches. */
|
||||
void LocateAndApplyIpsPatchesToModule(const ModuleId *module_id, u8 *mapped_nro, size_t mapped_size) {
|
||||
sts::patcher::LocateAndApplyIpsPatchesToModule(NroPatchesDirectory, NroPatchesProtectedSize, NroPatchesProtectedOffset, module_id, mapped_nro, mapped_size);
|
||||
ams::patcher::LocateAndApplyIpsPatchesToModule(NroPatchesDirectory, NroPatchesProtectedSize, NroPatchesProtectedOffset, module_id, mapped_nro, mapped_size);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <switch.h>
|
||||
#include <stratosphere/ro.hpp>
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
/* Apply IPS patches. */
|
||||
void LocateAndApplyIpsPatchesToModule(const ModuleId *module_id, u8 *mapped_nro, size_t mapped_size);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ro_patcher.hpp"
|
||||
#include "ro_service_impl.hpp"
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace sts::ro::impl {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
STS_ASSERT(context_id < MaxSessions);
|
||||
AMS_ASSERT(context_id < MaxSessions);
|
||||
return &g_process_contexts[context_id];
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ namespace sts::ro::impl {
|
||||
}
|
||||
}
|
||||
/* Failure to find a free context is actually an abort condition. */
|
||||
STS_ASSERT(false);
|
||||
AMS_ASSERT(false);
|
||||
}
|
||||
|
||||
void FreeContext(size_t context_id) {
|
||||
@@ -369,7 +369,7 @@ namespace sts::ro::impl {
|
||||
Result LoadNrr(size_t context_id, Handle process_h, u64 nrr_address, u64 nrr_size, ModuleType expected_type, bool enforce_type) {
|
||||
/* Get context. */
|
||||
ProcessContext *context = GetContextById(context_id);
|
||||
STS_ASSERT(context != nullptr);
|
||||
AMS_ASSERT(context != nullptr);
|
||||
|
||||
/* Get title id. */
|
||||
const ncm::TitleId title_id = context->GetTitleId(process_h);
|
||||
@@ -399,7 +399,7 @@ namespace sts::ro::impl {
|
||||
Result UnloadNrr(size_t context_id, u64 nrr_address) {
|
||||
/* Get context. */
|
||||
ProcessContext *context = GetContextById(context_id);
|
||||
STS_ASSERT(context != nullptr);
|
||||
AMS_ASSERT(context != nullptr);
|
||||
|
||||
/* Validate address. */
|
||||
R_UNLESS(util::IsAligned(nrr_address, 0x1000), ResultInvalidAddress());
|
||||
@@ -421,7 +421,7 @@ namespace sts::ro::impl {
|
||||
Result LoadNro(u64 *out_address, size_t context_id, u64 nro_address, u64 nro_size, u64 bss_address, u64 bss_size) {
|
||||
/* Get context. */
|
||||
ProcessContext *context = GetContextById(context_id);
|
||||
STS_ASSERT(context != nullptr);
|
||||
AMS_ASSERT(context != nullptr);
|
||||
|
||||
/* Validate address/size. */
|
||||
R_TRY(ValidateAddressAndSize(nro_address, nro_size));
|
||||
@@ -467,7 +467,7 @@ namespace sts::ro::impl {
|
||||
Result UnloadNro(size_t context_id, u64 nro_address) {
|
||||
/* Get context. */
|
||||
ProcessContext *context = GetContextById(context_id);
|
||||
STS_ASSERT(context != nullptr);
|
||||
AMS_ASSERT(context != nullptr);
|
||||
|
||||
/* Validate address. */
|
||||
R_UNLESS(util::IsAligned(nro_address, 0x1000), ResultInvalidAddress());
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ro.hpp>
|
||||
|
||||
namespace sts::ro::impl {
|
||||
namespace ams::ro::impl {
|
||||
|
||||
/* Definitions. */
|
||||
constexpr size_t InvalidContextId = static_cast<size_t>(-1);
|
||||
|
||||
Reference in New Issue
Block a user