From d3d6c552b707d2749e399714c1d25afad2c45d4a Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 20 Jun 2019 13:00:32 -0700 Subject: [PATCH] stratosphere: remove trailing whitespace --- .../ams_mitm/source/amsmitm_modules.hpp | 4 +-- .../source/bpc_mitm/bpc_ams_service.cpp | 4 +-- .../source/bpc_mitm/bpc_ams_service.hpp | 2 +- .../source/bpc_mitm/bpc_mitm_service.hpp | 8 +++--- .../ams_mitm/source/bpc_mitm/bpcmitm_main.cpp | 12 ++++----- .../bpc_mitm/bpcmitm_reboot_manager.cpp | 26 +++++++++---------- .../bpc_mitm/bpcmitm_reboot_manager.hpp | 2 +- stratosphere/ams_mitm/source/debug.cpp | 2 +- stratosphere/ams_mitm/source/debug.hpp | 2 +- .../source/fs_mitm/fs_file_storage.hpp | 2 +- .../source/fs_mitm/fs_filesystem_types.hpp | 6 ++--- .../ams_mitm/source/fs_mitm/fs_istorage.hpp | 6 ++--- .../ams_mitm/source/fs_mitm/fs_path_utils.hpp | 8 +++--- .../ams_mitm/source/fs_mitm/fs_shim.c | 6 ++--- .../source/fs_mitm/fsmitm_layeredrom.hpp | 6 ++--- .../ams_mitm/source/fs_mitm/fsmitm_main.cpp | 8 +++--- .../ams_mitm/source/fs_mitm/fsmitm_main.hpp | 2 +- .../source/fs_mitm/fsmitm_romfsbuild.hpp | 24 ++++++++--------- .../source/ns_mitm/nsmitm_am_service.hpp | 10 +++---- .../ams_mitm/source/ns_mitm/nsmitm_main.hpp | 2 +- .../source/ns_mitm/nsmitm_service_common.hpp | 2 +- .../source/ns_mitm/nsmitm_web_service.hpp | 10 +++---- .../ams_mitm/source/set_mitm/setmitm_main.hpp | 2 +- .../set_mitm/setsys_firmware_version.hpp | 2 +- .../source/set_mitm/setsys_mitm_service.hpp | 16 ++++++------ .../source/set_mitm/setsys_settings_items.hpp | 6 ++--- stratosphere/eclct.stub/source/eclct_stub.cpp | 4 +-- stratosphere/libstratosphere | 2 +- stratosphere/ro/source/ro_debug_monitor.cpp | 2 +- stratosphere/ro/source/ro_nrr.hpp | 2 +- stratosphere/ro/source/ro_service.hpp | 2 +- stratosphere/spl/source/spl_main.cpp | 4 +-- 32 files changed, 98 insertions(+), 98 deletions(-) diff --git a/stratosphere/ams_mitm/source/amsmitm_modules.hpp b/stratosphere/ams_mitm/source/amsmitm_modules.hpp index 490cee460..e808248f8 100644 --- a/stratosphere/ams_mitm/source/amsmitm_modules.hpp +++ b/stratosphere/ams_mitm/source/amsmitm_modules.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once enum MitmModuleId : u32 { @@ -21,7 +21,7 @@ enum MitmModuleId : u32 { MitmModuleId_SetMitm = 1, MitmModuleId_BpcMitm = 2, MitmModuleId_NsMitm = 3, - + /* Always keep this at the end. */ MitmModuleId_Count, }; diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.cpp b/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.cpp index 77b9ed30c..1e589967e 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.cpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.cpp @@ -24,9 +24,9 @@ Result BpcAtmosphereService::RebootToFatalError(InBuffer. */ - + #pragma once #include #include diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp b/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp index 7b6589730..a45f59e9d 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -30,7 +30,7 @@ class BpcMitmService : public IMitmServiceObject { BpcMitmService(std::shared_ptr s, u64 pid) : IMitmServiceObject(s, pid) { /* ... */ } - + static bool ShouldMitm(u64 pid, u64 tid) { /* We will mitm: * - am, to intercept the Reboot/Power buttons in the overlay menu. @@ -39,9 +39,9 @@ class BpcMitmService : public IMitmServiceObject { */ return tid == TitleId_Am || tid == TitleId_Fatal || TitleIdIsApplication(tid) || Utils::IsHblTid(tid); } - + static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx); - + protected: /* Overridden commands. */ Result ShutdownSystem(); diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_main.cpp b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_main.cpp index 36c9c0af8..4b14b9d05 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_main.cpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_main.cpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include @@ -33,13 +33,13 @@ void BpcMitmMain(void *arg) { /* Wait for initialization to occur */ Utils::WaitSdInitialized(); - + /* Load a payload off of the SD */ BpcRebootManager::Initialize(); - + /* Create server manager */ auto server_manager = new WaitableManager(2); - + /* Create bpc mitm. */ const char *service_name = "bpc"; if (GetRuntimeFirmwareVersion() < FirmwareVersion_200) { @@ -53,8 +53,8 @@ void BpcMitmMain(void *arg) { /* Loop forever, servicing our services. */ server_manager->Process(); - + delete server_manager; - + } diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp index a7701ccd8..51753aeb7 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.cpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include @@ -33,16 +33,16 @@ void BpcRebootManager::Initialize() { return; } ON_SCOPE_EXIT { fsFileClose(&payload_file); }; - + /* Clear payload buffer */ std::memset(g_reboot_payload, 0xFF, sizeof(g_reboot_payload)); - + /* Read payload file. */ size_t actual_size; fsFileRead(&payload_file, 0, g_reboot_payload, IRAM_PAYLOAD_MAX_SIZE, FS_READOPTION_NONE, &actual_size); - + g_payload_loaded = true; - + /* Figure out what kind of reboot we're gonna be doing. */ { char reboot_type[0x40] = {0}; @@ -62,7 +62,7 @@ void BpcRebootManager::Initialize() { static void ClearIram() { /* Make page FFs. */ memset(g_work_page, 0xFF, sizeof(g_work_page)); - + /* Overwrite all of IRAM with FFs. */ for (size_t ofs = 0; ofs < IRAM_SIZE; ofs += sizeof(g_work_page)) { CopyToIram(IRAM_BASE + ofs, g_work_page, sizeof(g_work_page)); @@ -74,15 +74,15 @@ static void DoRebootToPayload() { if (!g_payload_loaded) { RebootToRcm(); } - + /* Ensure clean IRAM state. */ ClearIram(); - + /* Copy in payload. */ for (size_t ofs = 0; ofs < sizeof(g_reboot_payload); ofs += 0x1000) { CopyToIram(IRAM_PAYLOAD_BASE + ofs, &g_reboot_payload[ofs], 0x1000); } - + RebootToIramPayload(); } @@ -103,16 +103,16 @@ Result BpcRebootManager::PerformReboot() { void BpcRebootManager::RebootForFatalError(AtmosphereFatalErrorContext *ctx) { /* Ensure clean IRAM state. */ ClearIram(); - - + + /* Copy in payload. */ for (size_t ofs = 0; ofs < sizeof(g_reboot_payload); ofs += 0x1000) { CopyToIram(IRAM_PAYLOAD_BASE + ofs, &g_reboot_payload[ofs], 0x1000); } - + memcpy(g_work_page, ctx, sizeof(*ctx)); CopyToIram(IRAM_PAYLOAD_BASE + IRAM_PAYLOAD_MAX_SIZE, g_work_page, sizeof(g_work_page)); - + /* If we don't actually have a payload loaded, just go to RCM. */ if (!g_payload_loaded) { RebootToRcm(); diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.hpp b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.hpp index 4eecce70a..dbe6ea64f 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.hpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpcmitm_reboot_manager.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include diff --git a/stratosphere/ams_mitm/source/debug.cpp b/stratosphere/ams_mitm/source/debug.cpp index 2305dddf2..11ed55a1c 100644 --- a/stratosphere/ams_mitm/source/debug.cpp +++ b/stratosphere/ams_mitm/source/debug.cpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include diff --git a/stratosphere/ams_mitm/source/debug.hpp b/stratosphere/ams_mitm/source/debug.hpp index 9d7304dd8..1a0d97337 100644 --- a/stratosphere/ams_mitm/source/debug.hpp +++ b/stratosphere/ams_mitm/source/debug.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once void Reboot(); diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_file_storage.hpp b/stratosphere/ams_mitm/source/fs_mitm/fs_file_storage.hpp index 58f4da8f4..84e8798db 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_file_storage.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_file_storage.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_filesystem_types.hpp b/stratosphere/ams_mitm/source/fs_mitm/fs_filesystem_types.hpp index 1ba082214..c9c194270 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_filesystem_types.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_filesystem_types.hpp @@ -15,12 +15,12 @@ */ #pragma once - + enum OpenMode { OpenMode_Read = (1 << 0), OpenMode_Write = (1 << 1), OpenMode_Append = (1 << 2), - + OpenMode_ReadWrite = OpenMode_Read | OpenMode_Write, OpenMode_All = OpenMode_ReadWrite | OpenMode_Append, }; @@ -28,7 +28,7 @@ enum OpenMode { enum DirectoryOpenMode { DirectoryOpenMode_Directories = (1 << 0), DirectoryOpenMode_Files = (1 << 1), - + DirectoryOpenMode_All = (DirectoryOpenMode_Directories | DirectoryOpenMode_Files), }; diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_istorage.hpp b/stratosphere/ams_mitm/source/fs_mitm/fs_istorage.hpp index 32705292b..02338bde7 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_istorage.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_istorage.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -57,7 +57,7 @@ class IStorageInterface : public IServiceObject { ~IStorageInterface() { delete base_storage; }; - + private: /* Actual command API. */ virtual Result Read(OutBuffer buffer, u64 offset, u64 size) final { @@ -86,7 +86,7 @@ class IStorageInterface : public IServiceObject { MakeServiceCommandMeta(), MakeServiceCommandMeta(), MakeServiceCommandMeta(), - + /* 4.0.0- */ MakeServiceCommandMeta(), }; diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_path_utils.hpp b/stratosphere/ams_mitm/source/fs_mitm/fs_path_utils.hpp index 2e57bcf4c..caba08706 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_path_utils.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_path_utils.hpp @@ -49,22 +49,22 @@ class FsPathUtils { public: static Result VerifyPath(const char *path, size_t max_path_len, size_t max_name_len); static Result ConvertPathForServiceObject(FsPath *out, const char *path); - + static Result IsNormalized(bool *out, const char *path); static Result Normalize(char *out, size_t max_out_size, const char *src, size_t *out_size); static bool IsWindowsDriveLetter(const char c) { return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); } - + static bool IsCurrentDirectory(const char *path) { return path[0] == '.' && (path[1] == 0 || path[1] == '/'); } - + static bool IsParentDirectory(const char *path) { return path[0] == '.' && path[1] == '.' && (path[2] == 0 || path[2] == '/'); } - + static bool IsWindowsAbsolutePath(const char *path) { /* Nintendo uses this in path comparisons... */ return IsWindowsDriveLetter(path[0]) && path[1] == ':'; diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_shim.c b/stratosphere/ams_mitm/source/fs_mitm/fs_shim.c index 02470f76e..f023f309f 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_shim.c +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_shim.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include "fs_shim.h" @@ -79,7 +79,7 @@ Result fsOpenDataStorageByCurrentProcessFwd(Service* s, FsStorage* out) { u64 magic; u64 result; } *resp; - + serviceIpcParse(s, &r, sizeof(*resp)); resp = r.Raw; @@ -119,7 +119,7 @@ Result fsOpenDataStorageByDataIdFwd(Service* s, FsStorageId storage_id, u64 data u64 magic; u64 result; } *resp; - + serviceIpcParse(s, &r, sizeof(*resp)); resp = r.Raw; diff --git a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_layeredrom.hpp b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_layeredrom.hpp index e06de07d4..740fa1478 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_layeredrom.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_layeredrom.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -32,11 +32,11 @@ class LayeredRomFS : public IROStorage { /* Information about the merged RomFS. */ u64 title_id; std::shared_ptr> p_source_infos; - + public: LayeredRomFS(std::shared_ptr s_r, std::shared_ptr f_r, u64 tid); virtual ~LayeredRomFS() = default; - + virtual Result Read(void *buffer, size_t size, u64 offset) override; virtual Result GetSize(u64 *out_size) override; virtual Result OperateRange(FsOperationId operation_type, u64 offset, u64 size, FsRangeInfo *out_range_info) override; diff --git a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.cpp b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.cpp index 0e34fac80..d5d5eadb9 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.cpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.cpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include @@ -35,16 +35,16 @@ struct FsMitmManagerOptions { }; using FsMitmManager = WaitableManager; -void FsMitmMain(void *arg) { +void FsMitmMain(void *arg) { /* Create server manager. */ auto server_manager = new FsMitmManager(5); /* Create fsp-srv mitm. */ AddMitmServerToManager(server_manager, "fsp-srv", 61); - + /* Loop forever, servicing our services. */ server_manager->Process(); - + delete server_manager; } diff --git a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.hpp b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.hpp index bad14e2af..cafb5a9b8 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_main.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include diff --git a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_romfsbuild.hpp b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_romfsbuild.hpp index d59ebe583..a5ff43aa6 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fsmitm_romfsbuild.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fsmitm_romfsbuild.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -67,7 +67,7 @@ struct RomFSSourceInfo { RomFSMetaDataSourceInfo metadata_source_info; }; RomFSDataSource type; - + RomFSSourceInfo(u64 v_o, u64 s, u64 offset, RomFSDataSource t) : virtual_offset(v_o), size(s), type(t) { switch (this->type) { case RomFSDataSource::BaseRomFS: @@ -85,7 +85,7 @@ struct RomFSSourceInfo { break; } } - + RomFSSourceInfo(u64 v_o, u64 s, const void *arg, RomFSDataSource t) : virtual_offset(v_o), size(s), type(t) { switch (this->type) { case RomFSDataSource::LooseFile: @@ -103,7 +103,7 @@ struct RomFSSourceInfo { break; } } - + RomFSSourceInfo(u64 v_o, u64 s, RomFSDataSource t) : virtual_offset(v_o), size(s), type(t) { switch (this->type) { case RomFSDataSource::MetaData: @@ -118,7 +118,7 @@ struct RomFSSourceInfo { break; } } - + void Cleanup() { switch (this->type) { case RomFSDataSource::BaseRomFS: @@ -137,7 +137,7 @@ struct RomFSSourceInfo { break; } } - + static bool Compare(RomFSSourceInfo *a, RomFSSourceInfo *b) { return (a->virtual_offset < b->virtual_offset); } @@ -229,13 +229,13 @@ class RomFSBuildContext { u64 dir_hash_table_size = 0; u64 file_hash_table_size = 0; u64 file_partition_size = 0; - + FsDirectoryEntry dir_entry; RomFSDataSource cur_source_type; - + void VisitDirectory(FsFileSystem *filesys, RomFSBuildDirectoryContext *parent); void VisitDirectory(RomFSBuildDirectoryContext *parent, u32 parent_offset, void *dir_table, size_t dir_table_size, void *file_table, size_t file_table_size); - + bool AddDirectory(RomFSBuildDirectoryContext *parent_dir_ctx, RomFSBuildDirectoryContext *dir_ctx, RomFSBuildDirectoryContext **out_dir_ctx); bool AddFile(RomFSBuildDirectoryContext *parent_dir_ctx, RomFSBuildFileContext *file_ctx); public: @@ -247,10 +247,10 @@ class RomFSBuildContext { this->num_dirs = 1; this->dir_table_size = 0x18; } - + void MergeSdFiles(); void MergeRomStorage(IROStorage *storage, RomFSDataSource source); - + /* This finalizes the context. */ void Build(std::vector *out_infos); }; @@ -270,7 +270,7 @@ static inline uint32_t romfs_calc_path_hash(uint32_t parent, const unsigned char hash = (hash >> 5) | (hash << 27); hash ^= path[start + i]; } - + return hash; } diff --git a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_am_service.hpp b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_am_service.hpp index 3c408be94..d83a084b4 100644 --- a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_am_service.hpp +++ b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_am_service.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -22,21 +22,21 @@ #include "nsmitm_service_common.hpp" -class NsAmMitmService : public IMitmServiceObject { +class NsAmMitmService : public IMitmServiceObject { public: NsAmMitmService(std::shared_ptr s, u64 pid) : IMitmServiceObject(s, pid) { /* ... */ } - + static bool ShouldMitm(u64 pid, u64 tid) { /* We will mitm: * - web applets, to facilitate hbl web browser launching. */ return Utils::IsWebAppletTid(tid); } - + static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx); - + protected: /* Overridden commands. */ Result GetApplicationContentPath(OutBuffer out_path, u64 app_id, u8 storage_type); diff --git a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_main.hpp b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_main.hpp index 43fd9d921..c5587b0d5 100644 --- a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_main.hpp +++ b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_main.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include diff --git a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_service_common.hpp b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_service_common.hpp index 6aa710797..5f550811a 100644 --- a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_service_common.hpp +++ b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_service_common.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include diff --git a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_web_service.hpp b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_web_service.hpp index 3fffac350..9b84d1ba2 100644 --- a/stratosphere/ams_mitm/source/ns_mitm/nsmitm_web_service.hpp +++ b/stratosphere/ams_mitm/source/ns_mitm/nsmitm_web_service.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -56,21 +56,21 @@ class NsDocumentService : public IServiceObject { }; }; -class NsWebMitmService : public IMitmServiceObject { +class NsWebMitmService : public IMitmServiceObject { public: NsWebMitmService(std::shared_ptr s, u64 pid) : IMitmServiceObject(s, pid) { /* ... */ } - + static bool ShouldMitm(u64 pid, u64 tid) { /* We will mitm: * - web applets, to facilitate hbl web browser launching. */ return Utils::IsWebAppletTid(tid); } - + static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx); - + protected: /* Overridden commands. */ Result GetDocumentInterface(Out> out_intf); diff --git a/stratosphere/ams_mitm/source/set_mitm/setmitm_main.hpp b/stratosphere/ams_mitm/source/set_mitm/setmitm_main.hpp index 6fd91c326..7a49d3a6b 100644 --- a/stratosphere/ams_mitm/source/set_mitm/setmitm_main.hpp +++ b/stratosphere/ams_mitm/source/set_mitm/setmitm_main.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include diff --git a/stratosphere/ams_mitm/source/set_mitm/setsys_firmware_version.hpp b/stratosphere/ams_mitm/source/set_mitm/setsys_firmware_version.hpp index d138964f9..a3570c62d 100644 --- a/stratosphere/ams_mitm/source/set_mitm/setsys_firmware_version.hpp +++ b/stratosphere/ams_mitm/source/set_mitm/setsys_firmware_version.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include diff --git a/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp b/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp index 9b88e0c61..7d3275b1c 100644 --- a/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -25,32 +25,32 @@ enum SetSysCmd : u32 { SetSysCmd_GetFirmwareVersion2 = 4, SetSysCmd_GetSettingsItemValueSize = 37, SetSysCmd_GetSettingsItemValue = 38, - + /* Commands for which set:sys *must* act as a passthrough. */ /* TODO: Solve the relevant IPC detection problem. */ SetSysCmd_GetEdid = 41, }; -class SetSysMitmService : public IMitmServiceObject { +class SetSysMitmService : public IMitmServiceObject { public: SetSysMitmService(std::shared_ptr s, u64 pid) : IMitmServiceObject(s, pid) { /* ... */ } - + static bool ShouldMitm(u64 pid, u64 tid) { /* Mitm everything. */ return true; } - + static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx); - + protected: /* Overridden commands. */ Result GetFirmwareVersion(OutPointerWithServerSize out); Result GetFirmwareVersion2(OutPointerWithServerSize out); Result GetSettingsItemValueSize(Out out_size, InPointer name, InPointer key); Result GetSettingsItemValue(Out out_size, OutBuffer out_value, InPointer name, InPointer key); - + /* Forced passthrough commands. */ Result GetEdid(OutPointerWithServerSize out); public: @@ -59,7 +59,7 @@ class SetSysMitmService : public IMitmServiceObject { MakeServiceCommandMeta(), MakeServiceCommandMeta(), MakeServiceCommandMeta(), - + MakeServiceCommandMeta(), }; }; diff --git a/stratosphere/ams_mitm/source/set_mitm/setsys_settings_items.hpp b/stratosphere/ams_mitm/source/set_mitm/setsys_settings_items.hpp index ad1f09636..e6ce9f413 100644 --- a/stratosphere/ams_mitm/source/set_mitm/setsys_settings_items.hpp +++ b/stratosphere/ams_mitm/source/set_mitm/setsys_settings_items.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include #include @@ -21,12 +21,12 @@ class SettingsItemManager { public: - static constexpr size_t MaxNameLength = 64; + static constexpr size_t MaxNameLength = 64; static constexpr size_t MaxKeyLength = 64; public: static Result ValidateName(const char *name, size_t max_size); static Result ValidateName(const char *name); - + static Result ValidateKey(const char *key, size_t max_size); static Result ValidateKey(const char *key); diff --git a/stratosphere/eclct.stub/source/eclct_stub.cpp b/stratosphere/eclct.stub/source/eclct_stub.cpp index fd6d73bbe..9ba761a8b 100644 --- a/stratosphere/eclct.stub/source/eclct_stub.cpp +++ b/stratosphere/eclct.stub/source/eclct_stub.cpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include @@ -31,7 +31,7 @@ extern "C" { #define INNER_HEAP_SIZE 0x8000 size_t nx_inner_heap_size = INNER_HEAP_SIZE; char nx_inner_heap[INNER_HEAP_SIZE]; - + void __libnx_initheap(void); void __appInit(void); void __appExit(void); diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index 4a120c3c1..59b49c0e0 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit 4a120c3c1697683df839e0a510d86107866be188 +Subproject commit 59b49c0e0c64f896ce36180bb7d00f54f70300e9 diff --git a/stratosphere/ro/source/ro_debug_monitor.cpp b/stratosphere/ro/source/ro_debug_monitor.cpp index ef6897c60..c0eb68697 100644 --- a/stratosphere/ro/source/ro_debug_monitor.cpp +++ b/stratosphere/ro/source/ro_debug_monitor.cpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include #include #include diff --git a/stratosphere/ro/source/ro_nrr.hpp b/stratosphere/ro/source/ro_nrr.hpp index 08e2204d9..d49ab6374 100644 --- a/stratosphere/ro/source/ro_nrr.hpp +++ b/stratosphere/ro/source/ro_nrr.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include diff --git a/stratosphere/ro/source/ro_service.hpp b/stratosphere/ro/source/ro_service.hpp index 6354d0805..aa693011c 100644 --- a/stratosphere/ro/source/ro_service.hpp +++ b/stratosphere/ro/source/ro_service.hpp @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include diff --git a/stratosphere/spl/source/spl_main.cpp b/stratosphere/spl/source/spl_main.cpp index 7cae77b4a..863c9f3b6 100644 --- a/stratosphere/spl/source/spl_main.cpp +++ b/stratosphere/spl/source/spl_main.cpp @@ -103,7 +103,7 @@ static const auto MakeDeprecatedService = []() { return std::make_shared("spl:", 12)); } - + /* Loop forever, servicing our services. */ s_server_manager.Process();