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:
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "ldr_arguments.hpp"
|
||||
|
||||
namespace sts::ldr::args {
|
||||
namespace ams::ldr::args {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr::args {
|
||||
namespace ams::ldr::args {
|
||||
|
||||
constexpr size_t ArgumentSizeMax = 0x8000;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "ldr_capabilities.hpp"
|
||||
|
||||
namespace sts::ldr::caps {
|
||||
namespace ams::ldr::caps {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr::caps {
|
||||
namespace ams::ldr::caps {
|
||||
|
||||
/* Capabilities API. */
|
||||
Result ValidateCapabilities(const void *acid_kac, size_t acid_kac_size, const void *aci_kac, size_t aci_kac_size);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ldr_content_management.hpp"
|
||||
#include "ldr_ecs.hpp"
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace sts::ldr {
|
||||
Result MountNspFileSystem(const char *device_name, const char *path) {
|
||||
FsFileSystem fs;
|
||||
R_TRY(fsOpenFileSystemWithId(&fs, 0, FsFileSystemType_ApplicationPackage, path));
|
||||
STS_ASSERT(fsdevMountDevice(device_name, fs) >= 0);
|
||||
AMS_ASSERT(fsdevMountDevice(device_name, fs) >= 0);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace sts::ldr {
|
||||
/* Try to mount the content path. */
|
||||
FsFileSystem fs;
|
||||
R_TRY(fsldrOpenCodeFileSystem(static_cast<u64>(loc.title_id), path, &fs));
|
||||
STS_ASSERT(fsdevMountDevice(CodeFileSystemDeviceName, fs) != -1);
|
||||
AMS_ASSERT(fsdevMountDevice(CodeFileSystemDeviceName, fs) != -1);
|
||||
|
||||
/* Note that we mounted code. */
|
||||
this->is_code_mounted = true;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
/* Utility reference to make code mounting automatic. */
|
||||
class ScopedCodeMount {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <unordered_map>
|
||||
#include "ldr_ecs.hpp"
|
||||
|
||||
namespace sts::ldr::ecs {
|
||||
namespace ams::ldr::ecs {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr::ecs {
|
||||
namespace ams::ldr::ecs {
|
||||
|
||||
/* External Content Source API. */
|
||||
const char *Get(ncm::TitleId title_id);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ldr_launch_record.hpp"
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace sts::ldr {
|
||||
|
||||
/* Loader wants to override this libstratosphere function, which is weakly linked. */
|
||||
/* This is necessary to prevent circular dependencies. */
|
||||
namespace sts::pm::info {
|
||||
namespace ams::pm::info {
|
||||
|
||||
Result HasLaunchedTitle(bool *out, ncm::TitleId title_id) {
|
||||
*out = ldr::HasLaunchedTitle(title_id);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
/* Launch Record API. */
|
||||
bool HasLaunchedTitle(ncm::TitleId title_id);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "ldr_loader_service.hpp"
|
||||
#include "ldr_ro_manager.hpp"
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
/* Official commands. */
|
||||
Result LoaderService::CreateProcess(sf::OutMoveHandle proc_h, PinId id, u32 flags, sf::CopyHandle reslimit_h) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
class LoaderService : public sf::IServiceObject {
|
||||
protected:
|
||||
|
||||
@@ -48,19 +48,19 @@ extern "C" {
|
||||
void __libnx_exception_handler(ThreadExceptionDump *ctx);
|
||||
}
|
||||
|
||||
namespace sts::ams {
|
||||
namespace ams {
|
||||
|
||||
ncm::TitleId StratosphereTitleId = ncm::TitleId::Loader;
|
||||
ncm::TitleId CurrentTitleId = ncm::TitleId::Loader;
|
||||
|
||||
namespace result {
|
||||
|
||||
bool CallFatalOnResultAssertion = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace sts::result {
|
||||
|
||||
bool CallFatalOnResultAssertion = false;
|
||||
|
||||
}
|
||||
|
||||
using namespace sts;
|
||||
using namespace ams;
|
||||
|
||||
void __libnx_exception_handler(ThreadExceptionDump *ctx) {
|
||||
ams::CrashHandler(ctx);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ldr_content_management.hpp"
|
||||
#include "ldr_meta.hpp"
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
struct Meta {
|
||||
Npdm *npdm;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "ldr_patcher.hpp"
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace sts::ldr {
|
||||
void LocateAndApplyIpsPatchesToModule(const u8 *build_id, uintptr_t mapped_nso, size_t mapped_size) {
|
||||
ro::ModuleId module_id;
|
||||
std::memcpy(&module_id.build_id, build_id, sizeof(module_id.build_id));
|
||||
sts::patcher::LocateAndApplyIpsPatchesToModule(NsoPatchesDirectory, NsoPatchesProtectedSize, NsoPatchesProtectedOffset, &module_id, reinterpret_cast<u8 *>(mapped_nso), mapped_size);
|
||||
ams::patcher::LocateAndApplyIpsPatchesToModule(NsoPatchesDirectory, NsoPatchesProtectedSize, NsoPatchesProtectedOffset, &module_id, reinterpret_cast<u8 *>(mapped_nso), mapped_size);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <switch.h>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
/* Apply IPS patches. */
|
||||
void LocateAndApplyIpsPatchesToModule(const u8 *build_id, uintptr_t mapped_nso, size_t mapped_size);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "ldr_process_creation.hpp"
|
||||
#include "ldr_ro_manager.hpp"
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace sts::ldr {
|
||||
};
|
||||
|
||||
constexpr const char *GetNsoName(size_t idx) {
|
||||
STS_ASSERT(idx < Nso_Count);
|
||||
AMS_ASSERT(idx < Nso_Count);
|
||||
|
||||
constexpr const char *NsoNames[Nso_Count] = {
|
||||
"rtld",
|
||||
@@ -491,7 +491,7 @@ namespace sts::ldr {
|
||||
aslr_start = map::AslrBase64Bit;
|
||||
aslr_size = map::AslrSize64Bit;
|
||||
break;
|
||||
STS_UNREACHABLE_DEFAULT_CASE();
|
||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||
}
|
||||
} else {
|
||||
/* On 1.0.0, only 2 address space types existed. */
|
||||
@@ -509,7 +509,7 @@ namespace sts::ldr {
|
||||
uintptr_t aslr_slide = 0;
|
||||
uintptr_t unused_size = (aslr_size - total_size);
|
||||
if (out_cpi->flags & svc::CreateProcessFlag_EnableAslr) {
|
||||
aslr_slide = sts::rnd::GenerateRandomU64(unused_size / BaseAddressAlignment) * BaseAddressAlignment;
|
||||
aslr_slide = ams::rnd::GenerateRandomU64(unused_size / BaseAddressAlignment) * BaseAddressAlignment;
|
||||
}
|
||||
|
||||
/* Set out. */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "ldr_arguments.hpp"
|
||||
|
||||
namespace sts::ldr {
|
||||
namespace ams::ldr {
|
||||
|
||||
/* Process Creation API. */
|
||||
Result CreateProcess(Handle *out, PinId pin_id, const ncm::TitleLocation &loc, const char *path, u32 flags, Handle reslimit_h);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <stratosphere/ro.hpp>
|
||||
#include "ldr_ro_manager.hpp"
|
||||
|
||||
namespace sts::ldr::ro {
|
||||
namespace ams::ldr::ro {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/ldr.hpp>
|
||||
|
||||
namespace sts::ldr::ro {
|
||||
namespace ams::ldr::ro {
|
||||
|
||||
/* RO Manager API. */
|
||||
Result PinTitle(PinId *out, const ncm::TitleLocation &loc);
|
||||
|
||||
Reference in New Issue
Block a user