From c190d4634369c6daf13d78658da953c95af9df71 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 13 Apr 2020 22:19:44 -0700 Subject: [PATCH] hos::Version: rename enum members --- .../include/stratosphere/ams/ams_types.hpp | 1 + .../erpt/sf/erpt_sf_i_context.hpp | 18 ++++---- .../erpt/sf/erpt_sf_i_manager.hpp | 8 ++-- .../erpt/sf/erpt_sf_i_session.hpp | 2 +- .../fssrv_filesystem_interface_adapter.hpp | 8 ++-- .../fssrv_storage_interface_adapter.hpp | 2 +- .../include/stratosphere/hos/hos_types.hpp | 27 ++++++------ .../lr_add_on_content_location_resolver.hpp | 2 +- .../lr_i_add_on_content_location_resolver.hpp | 12 ++--- .../lr/lr_i_location_resolver.hpp | 38 ++++++++-------- .../lr/lr_i_registered_location_resolver.hpp | 24 +++++----- .../stratosphere/lr/lr_location_resolver.hpp | 14 +++--- .../lr/lr_location_resolver_manager_impl.hpp | 2 +- .../lr/lr_registered_location_resolver.hpp | 8 ++-- .../ncm/ncm_content_manager_config.hpp | 2 +- .../stratosphere/ncm/ncm_content_storage.hpp | 8 ++-- .../ncm/ncm_i_content_manager.hpp | 14 +++--- .../ncm/ncm_i_content_meta_database.hpp | 4 +- .../ncm/ncm_i_content_storage.hpp | 28 ++++++------ .../psc/sf/psc_sf_i_pm_module.hpp | 2 +- libstratosphere/source/boot2/boot2_api.cpp | 4 +- .../source/cfg/cfg_privileged_process.cpp | 4 +- .../source/erpt/srv/erpt_srv_main.cpp | 2 +- .../source/erpt/srv/erpt_srv_reporter.cpp | 2 +- .../source/fs/fs_signed_system_partition.cpp | 2 +- .../source/hos/hos_version_api.cpp | 44 +++++++++---------- ..._add_on_content_location_resolver_impl.hpp | 2 +- .../lr_registered_location_resolver_impl.cpp | 2 +- .../lr_registered_location_resolver_impl.hpp | 2 +- libstratosphere/source/map/map_api.cpp | 6 +-- libstratosphere/source/ncm/ncm_api.cpp | 4 +- .../source/ncm/ncm_content_manager_impl.cpp | 14 +++--- .../ncm/ncm_content_meta_database_impl.cpp | 2 +- .../source/ncm/ncm_content_storage_impl.cpp | 4 +- .../ncm/ncm_content_storage_impl_base.hpp | 2 +- .../os_thread_manager_impl.os.horizon.cpp | 2 +- .../source/psc/psc_pm_module.os.horizon.cpp | 2 +- .../sf/cmif/sf_cmif_service_dispatch.cpp | 4 +- 38 files changed, 165 insertions(+), 163 deletions(-) diff --git a/libstratosphere/include/stratosphere/ams/ams_types.hpp b/libstratosphere/include/stratosphere/ams/ams_types.hpp index 59f2b1ec..40ac14db 100644 --- a/libstratosphere/include/stratosphere/ams/ams_types.hpp +++ b/libstratosphere/include/stratosphere/ams/ams_types.hpp @@ -35,6 +35,7 @@ namespace ams::exosphere { AMS_DEFINE_TARGET_FIRMWARE_ENUM(810), AMS_DEFINE_TARGET_FIRMWARE_ENUM(900), AMS_DEFINE_TARGET_FIRMWARE_ENUM(910), + AMS_DEFINE_TARGET_FIRMWARE_ENUM(1000), }; #undef AMS_DEFINE_TARGET_FIRMWARE_ENUM diff --git a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp index eaf91656..85d18ef4 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp +++ b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp @@ -54,15 +54,15 @@ namespace ams::erpt::sf { DEFINE_SERVICE_DISPATCH_TABLE { MAKE_SERVICE_COMMAND_META(SubmitContext), MAKE_SERVICE_COMMAND_META(CreateReport), - MAKE_SERVICE_COMMAND_META(SetInitialLaunchSettingsCompletionTime, hos::Version_300), - MAKE_SERVICE_COMMAND_META(ClearInitialLaunchSettingsCompletionTime, hos::Version_300), - MAKE_SERVICE_COMMAND_META(UpdatePowerOnTime, hos::Version_300), - MAKE_SERVICE_COMMAND_META(UpdateAwakeTime, hos::Version_300), - MAKE_SERVICE_COMMAND_META(SubmitMultipleCategoryContext, hos::Version_500), - MAKE_SERVICE_COMMAND_META(UpdateApplicationLaunchTime, hos::Version_600), - MAKE_SERVICE_COMMAND_META(ClearApplicationLaunchTime, hos::Version_600), - MAKE_SERVICE_COMMAND_META(SubmitAttachment, hos::Version_800), - MAKE_SERVICE_COMMAND_META(CreateReportWithAttachments, hos::Version_800), + MAKE_SERVICE_COMMAND_META(SetInitialLaunchSettingsCompletionTime, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(ClearInitialLaunchSettingsCompletionTime, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(UpdatePowerOnTime, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(UpdateAwakeTime, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(SubmitMultipleCategoryContext, hos::Version_5_0_0), + MAKE_SERVICE_COMMAND_META(UpdateApplicationLaunchTime, hos::Version_6_0_0), + MAKE_SERVICE_COMMAND_META(ClearApplicationLaunchTime, hos::Version_6_0_0), + MAKE_SERVICE_COMMAND_META(SubmitAttachment, hos::Version_8_0_0), + MAKE_SERVICE_COMMAND_META(CreateReportWithAttachments, hos::Version_8_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp index 02998d56..43329a6f 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp +++ b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp @@ -41,10 +41,10 @@ namespace ams::erpt::sf { DEFINE_SERVICE_DISPATCH_TABLE { MAKE_SERVICE_COMMAND_META(GetReportList), MAKE_SERVICE_COMMAND_META(GetEvent), - MAKE_SERVICE_COMMAND_META(CleanupReports, hos::Version_400), - MAKE_SERVICE_COMMAND_META(DeleteReport, hos::Version_500), - MAKE_SERVICE_COMMAND_META(GetStorageUsageStatistics, hos::Version_500), - MAKE_SERVICE_COMMAND_META(GetAttachmentList, hos::Version_800), + MAKE_SERVICE_COMMAND_META(CleanupReports, hos::Version_4_0_0), + MAKE_SERVICE_COMMAND_META(DeleteReport, hos::Version_5_0_0), + MAKE_SERVICE_COMMAND_META(GetStorageUsageStatistics, hos::Version_5_0_0), + MAKE_SERVICE_COMMAND_META(GetAttachmentList, hos::Version_8_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp index f00aa0fa..739d0bde 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp +++ b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp @@ -38,7 +38,7 @@ namespace ams::erpt::sf { DEFINE_SERVICE_DISPATCH_TABLE { MAKE_SERVICE_COMMAND_META(OpenReport), MAKE_SERVICE_COMMAND_META(OpenManager), - MAKE_SERVICE_COMMAND_META(OpenAttachment, hos::Version_800), + MAKE_SERVICE_COMMAND_META(OpenAttachment, hos::Version_8_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_filesystem_interface_adapter.hpp b/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_filesystem_interface_adapter.hpp index 1516a489..4355176d 100644 --- a/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_filesystem_interface_adapter.hpp +++ b/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_filesystem_interface_adapter.hpp @@ -72,7 +72,7 @@ namespace ams::fssrv::impl { MAKE_SERVICE_COMMAND_META(GetSize), /* 4.0.0- */ - MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_400), + MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_4_0_0), }; }; @@ -181,11 +181,11 @@ namespace ams::fssrv::impl { MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize), /* 3.0.0- */ - MAKE_SERVICE_COMMAND_META(CleanDirectoryRecursively, hos::Version_300), - MAKE_SERVICE_COMMAND_META(GetFileTimeStampRaw, hos::Version_300), + MAKE_SERVICE_COMMAND_META(CleanDirectoryRecursively, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(GetFileTimeStampRaw, hos::Version_3_0_0), /* 4.0.0- */ - MAKE_SERVICE_COMMAND_META(QueryEntry, hos::Version_400), + MAKE_SERVICE_COMMAND_META(QueryEntry, hos::Version_4_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_storage_interface_adapter.hpp b/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_storage_interface_adapter.hpp index f0bb6748..6170e3f0 100644 --- a/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_storage_interface_adapter.hpp +++ b/libstratosphere/include/stratosphere/fssrv/interface_adapters/fssrv_storage_interface_adapter.hpp @@ -71,7 +71,7 @@ namespace ams::fssrv::impl { MAKE_SERVICE_COMMAND_META(GetSize), /* 4.0.0- */ - MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_400), + MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_4_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/hos/hos_types.hpp b/libstratosphere/include/stratosphere/hos/hos_types.hpp index a2253bd2..299828a8 100644 --- a/libstratosphere/include/stratosphere/hos/hos_types.hpp +++ b/libstratosphere/include/stratosphere/hos/hos_types.hpp @@ -20,19 +20,20 @@ namespace ams::hos { enum Version : u16 { - Version_Min = 0, - Version_100 = Version_Min, - Version_200 = 1, - Version_300 = 2, - Version_400 = 3, - Version_500 = 4, - Version_600 = 5, - Version_700 = 6, - Version_800 = 7, - Version_810 = 8, - Version_900 = 9, - Version_910 = 10, - Version_Current = Version_910, + Version_Min = 0, + Version_1_0_0 = Version_Min, + Version_2_0_0 = 1, + Version_3_0_0 = 2, + Version_4_0_0 = 3, + Version_5_0_0 = 4, + Version_6_0_0 = 5, + Version_7_0_0 = 6, + Version_8_0_0 = 7, + Version_8_1_0 = 8, + Version_9_0_0 = 9, + Version_9_1_0 = 10, + Version_10_0_0 = 11, + Version_Current = Version_10_0_0, Version_Max = 32, }; diff --git a/libstratosphere/include/stratosphere/lr/lr_add_on_content_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_add_on_content_location_resolver.hpp index c204898b..6402693c 100644 --- a/libstratosphere/include/stratosphere/lr/lr_add_on_content_location_resolver.hpp +++ b/libstratosphere/include/stratosphere/lr/lr_add_on_content_location_resolver.hpp @@ -49,7 +49,7 @@ namespace ams::lr { Result RegisterAddOnContentStorage(ncm::DataId id, ncm::ApplicationId application_id, ncm::StorageId storage_id) { AMS_ASSERT(this->interface); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { return this->interface->RegisterAddOnContentStorage(id, application_id, storage_id); } else { return this->interface->RegisterAddOnContentStorageDeprecated(id, storage_id); diff --git a/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp index 17080961..70a8a58b 100644 --- a/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp +++ b/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp @@ -39,12 +39,12 @@ namespace ams::lr { virtual Result UnregisterApplicationAddOnContent(ncm::ApplicationId id) = 0; public: DEFINE_SERVICE_DISPATCH_TABLE { - MAKE_SERVICE_COMMAND_META(ResolveAddOnContentPath, hos::Version_200), - MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorageDeprecated, hos::Version_200, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorage, hos::Version_900), - MAKE_SERVICE_COMMAND_META(UnregisterAllAddOnContentPath, hos::Version_200), - MAKE_SERVICE_COMMAND_META(RefreshApplicationAddOnContent, hos::Version_900), - MAKE_SERVICE_COMMAND_META(UnregisterApplicationAddOnContent, hos::Version_900), + MAKE_SERVICE_COMMAND_META(ResolveAddOnContentPath, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorageDeprecated, hos::Version_2_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorage, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(UnregisterAllAddOnContentPath, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(RefreshApplicationAddOnContent, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(UnregisterApplicationAddOnContent, hos::Version_9_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp index 4e764ad2..d9d8d9da 100644 --- a/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp +++ b/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp @@ -88,27 +88,27 @@ namespace ams::lr { MAKE_SERVICE_COMMAND_META(ResolveApplicationControlPath), MAKE_SERVICE_COMMAND_META(ResolveApplicationHtmlDocumentPath), MAKE_SERVICE_COMMAND_META(ResolveDataPath), - MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPathDeprecated, hos::Version_100, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPath, hos::Version_900), - MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPathDeprecated, hos::Version_100, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPath, hos::Version_900), + MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPath, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPath, hos::Version_9_0_0), MAKE_SERVICE_COMMAND_META(ResolveApplicationLegalInformationPath), - MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPathDeprecated, hos::Version_100, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPath, hos::Version_900), + MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPath, hos::Version_9_0_0), MAKE_SERVICE_COMMAND_META(Refresh), - MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathDeprecated, hos::Version_500, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPath, hos::Version_900), - MAKE_SERVICE_COMMAND_META(ClearApplicationRedirectionDeprecated, hos::Version_500, hos::Version_810), - MAKE_SERVICE_COMMAND_META(ClearApplicationRedirection, hos::Version_900), - MAKE_SERVICE_COMMAND_META(EraseProgramRedirection, hos::Version_500), - MAKE_SERVICE_COMMAND_META(EraseApplicationControlRedirection, hos::Version_500), - MAKE_SERVICE_COMMAND_META(EraseApplicationHtmlDocumentRedirection, hos::Version_500), - MAKE_SERVICE_COMMAND_META(EraseApplicationLegalInformationRedirection, hos::Version_500), - MAKE_SERVICE_COMMAND_META(ResolveProgramPathForDebug, hos::Version_700), - MAKE_SERVICE_COMMAND_META(RedirectProgramPathForDebug, hos::Version_700), - MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebugDeprecated, hos::Version_700, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebug, hos::Version_900), - MAKE_SERVICE_COMMAND_META(EraseProgramRedirectionForDebug, hos::Version_700), + MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathDeprecated, hos::Version_5_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPath, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(ClearApplicationRedirectionDeprecated, hos::Version_5_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(ClearApplicationRedirection, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(EraseProgramRedirection, hos::Version_5_0_0), + MAKE_SERVICE_COMMAND_META(EraseApplicationControlRedirection, hos::Version_5_0_0), + MAKE_SERVICE_COMMAND_META(EraseApplicationHtmlDocumentRedirection, hos::Version_5_0_0), + MAKE_SERVICE_COMMAND_META(EraseApplicationLegalInformationRedirection, hos::Version_5_0_0), + MAKE_SERVICE_COMMAND_META(ResolveProgramPathForDebug, hos::Version_7_0_0), + MAKE_SERVICE_COMMAND_META(RedirectProgramPathForDebug, hos::Version_7_0_0), + MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebugDeprecated, hos::Version_7_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebug, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(EraseProgramRedirectionForDebug, hos::Version_7_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp index 255a45f0..837dfbc8 100644 --- a/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp +++ b/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp @@ -56,19 +56,19 @@ namespace ams::lr { public: DEFINE_SERVICE_DISPATCH_TABLE { MAKE_SERVICE_COMMAND_META(ResolveProgramPath), - MAKE_SERVICE_COMMAND_META(RegisterProgramPathDeprecated, hos::Version_100, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RegisterProgramPath, hos::Version_900), + MAKE_SERVICE_COMMAND_META(RegisterProgramPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RegisterProgramPath, hos::Version_9_0_0), MAKE_SERVICE_COMMAND_META(UnregisterProgramPath), - MAKE_SERVICE_COMMAND_META(RedirectProgramPathDeprecated, hos::Version_100, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RedirectProgramPath, hos::Version_900), - MAKE_SERVICE_COMMAND_META(ResolveHtmlDocumentPath, hos::Version_200), - MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPathDeprecated, hos::Version_200, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPath, hos::Version_900), - MAKE_SERVICE_COMMAND_META(UnregisterHtmlDocumentPath, hos::Version_200), - MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPathDeprecated, hos::Version_200, hos::Version_810), - MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPath, hos::Version_900), - MAKE_SERVICE_COMMAND_META(Refresh, hos::Version_700), - MAKE_SERVICE_COMMAND_META(RefreshExcluding, hos::Version_900), + MAKE_SERVICE_COMMAND_META(RedirectProgramPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RedirectProgramPath, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(ResolveHtmlDocumentPath, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPathDeprecated, hos::Version_2_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPath, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(UnregisterHtmlDocumentPath, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPathDeprecated, hos::Version_2_0_0, hos::Version_8_1_0), + MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPath, hos::Version_9_0_0), + MAKE_SERVICE_COMMAND_META(Refresh, hos::Version_7_0_0), + MAKE_SERVICE_COMMAND_META(RefreshExcluding, hos::Version_9_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/lr/lr_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_location_resolver.hpp index 0291d763..44f21789 100644 --- a/libstratosphere/include/stratosphere/lr/lr_location_resolver.hpp +++ b/libstratosphere/include/stratosphere/lr/lr_location_resolver.hpp @@ -68,7 +68,7 @@ namespace ams::lr { void RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface != nullptr); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(this->interface->RedirectApplicationControlPath(path, id, owner_id)); } else { R_ABORT_UNLESS(this->interface->RedirectApplicationControlPathDeprecated(path, id)); @@ -77,7 +77,7 @@ namespace ams::lr { void RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface != nullptr); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id)); } else { R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id)); @@ -91,7 +91,7 @@ namespace ams::lr { void RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface != nullptr); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPath(path, id, owner_id)); } else { R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPathDeprecated(path, id)); @@ -105,7 +105,7 @@ namespace ams::lr { void RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface != nullptr); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPath(path, id, owner_id)); } else { R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathDeprecated(path, id)); @@ -114,13 +114,13 @@ namespace ams::lr { Result ClearApplicationRedirection() { AMS_ASSERT(this->interface != nullptr); - AMS_ASSERT(hos::GetVersion() < hos::Version_900); + AMS_ASSERT(hos::GetVersion() < hos::Version_9_0_0); return this->ClearApplicationRedirection(nullptr, 0); } Result ClearApplicationRedirection(const ncm::ProgramId *excluding_ids, size_t num_ids) { AMS_ASSERT(this->interface != nullptr); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { return this->interface->ClearApplicationRedirection(sf::InArray(excluding_ids, num_ids)); } else { return this->interface->ClearApplicationRedirectionDeprecated(); @@ -159,7 +159,7 @@ namespace ams::lr { void RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface != nullptr); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebug(path, id, owner_id)); } else { R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebugDeprecated(path, id)); diff --git a/libstratosphere/include/stratosphere/lr/lr_location_resolver_manager_impl.hpp b/libstratosphere/include/stratosphere/lr/lr_location_resolver_manager_impl.hpp index c9da61cb..6711cab7 100644 --- a/libstratosphere/include/stratosphere/lr/lr_location_resolver_manager_impl.hpp +++ b/libstratosphere/include/stratosphere/lr/lr_location_resolver_manager_impl.hpp @@ -40,7 +40,7 @@ namespace ams::lr { MAKE_SERVICE_COMMAND_META(OpenLocationResolver), MAKE_SERVICE_COMMAND_META(OpenRegisteredLocationResolver), MAKE_SERVICE_COMMAND_META(RefreshLocationResolver), - MAKE_SERVICE_COMMAND_META(OpenAddOnContentLocationResolver, hos::Version_200), + MAKE_SERVICE_COMMAND_META(OpenAddOnContentLocationResolver, hos::Version_2_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/lr/lr_registered_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_registered_location_resolver.hpp index 5b26b034..075263ae 100644 --- a/libstratosphere/include/stratosphere/lr/lr_registered_location_resolver.hpp +++ b/libstratosphere/include/stratosphere/lr/lr_registered_location_resolver.hpp @@ -49,7 +49,7 @@ namespace ams::lr { Result RegisterProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { return this->interface->RegisterProgramPath(path, id, owner_id); } else { return this->interface->RegisterProgramPathDeprecated(path, id); @@ -63,7 +63,7 @@ namespace ams::lr { void RedirectProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(this->interface->RedirectProgramPath(path, id, owner_id)); } else { R_ABORT_UNLESS(this->interface->RedirectProgramPathDeprecated(path, id)); @@ -77,7 +77,7 @@ namespace ams::lr { Result RegisterHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { return this->interface->RegisterHtmlDocumentPath(path, id, owner_id); } else { return this->interface->RegisterHtmlDocumentPathDeprecated(path, id); @@ -91,7 +91,7 @@ namespace ams::lr { void RedirectHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(this->interface); - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPath(path, id, owner_id)); } else { R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPathDeprecated(path, id)); diff --git a/libstratosphere/include/stratosphere/ncm/ncm_content_manager_config.hpp b/libstratosphere/include/stratosphere/ncm/ncm_content_manager_config.hpp index 39b63231..fd3c1cd6 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_content_manager_config.hpp +++ b/libstratosphere/include/stratosphere/ncm/ncm_content_manager_config.hpp @@ -27,7 +27,7 @@ namespace ams::ncm { } bool ShouldBuildDatabase() const { - return hos::GetVersion() < hos::Version_400 || this->build_system_database; + return hos::GetVersion() < hos::Version_4_0_0 || this->build_system_database; } bool ShouldImportDatabaseFromSignedSystemPartitionOnSd() const { diff --git a/libstratosphere/include/stratosphere/ncm/ncm_content_storage.hpp b/libstratosphere/include/stratosphere/ncm/ncm_content_storage.hpp index b776399d..5d479015 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_content_storage.hpp +++ b/libstratosphere/include/stratosphere/ncm/ncm_content_storage.hpp @@ -144,25 +144,25 @@ namespace ams::ncm { Result GetRightsId(ams::fs::RightsId *out_rights_id, PlaceHolderId placeholder_id) { AMS_ASSERT(this->interface != nullptr); - AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_300); + AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_3_0_0); return this->interface->GetRightsIdFromPlaceHolderIdDeprecated(out_rights_id, placeholder_id); } Result GetRightsId(ncm::RightsId *out_rights_id, PlaceHolderId placeholder_id) { AMS_ASSERT(this->interface != nullptr); - AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_300); + AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_3_0_0); return this->interface->GetRightsIdFromPlaceHolderId(out_rights_id, placeholder_id); } Result GetRightsId(ams::fs::RightsId *out_rights_id, ContentId content_id) { AMS_ASSERT(this->interface != nullptr); - AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_300); + AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_3_0_0); return this->interface->GetRightsIdFromContentIdDeprecated(out_rights_id, content_id); } Result GetRightsId(ncm::RightsId *out_rights_id, ContentId content_id) { AMS_ASSERT(this->interface != nullptr); - AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_300); + AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_3_0_0); return this->interface->GetRightsIdFromContentId(out_rights_id, content_id); } diff --git a/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp b/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp index 87617cea..7561dfb0 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp +++ b/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp @@ -60,14 +60,14 @@ namespace ams::ncm { MAKE_SERVICE_COMMAND_META(VerifyContentMetaDatabase), MAKE_SERVICE_COMMAND_META(OpenContentStorage), MAKE_SERVICE_COMMAND_META(OpenContentMetaDatabase), - MAKE_SERVICE_COMMAND_META(CloseContentStorageForcibly, hos::Version_100, hos::Version_100), - MAKE_SERVICE_COMMAND_META(CloseContentMetaDatabaseForcibly, hos::Version_100, hos::Version_100), + MAKE_SERVICE_COMMAND_META(CloseContentStorageForcibly, hos::Version_1_0_0, hos::Version_1_0_0), + MAKE_SERVICE_COMMAND_META(CloseContentMetaDatabaseForcibly, hos::Version_1_0_0, hos::Version_1_0_0), MAKE_SERVICE_COMMAND_META(CleanupContentMetaDatabase), - MAKE_SERVICE_COMMAND_META(ActivateContentStorage, hos::Version_200), - MAKE_SERVICE_COMMAND_META(InactivateContentStorage, hos::Version_200), - MAKE_SERVICE_COMMAND_META(ActivateContentMetaDatabase, hos::Version_200), - MAKE_SERVICE_COMMAND_META(InactivateContentMetaDatabase, hos::Version_200), - MAKE_SERVICE_COMMAND_META(InvalidateRightsIdCache, hos::Version_900), + MAKE_SERVICE_COMMAND_META(ActivateContentStorage, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(InactivateContentStorage, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(ActivateContentMetaDatabase, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(InactivateContentMetaDatabase, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(InvalidateRightsIdCache, hos::Version_9_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp b/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp index cc3e06b1..ab77a4df 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp +++ b/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp @@ -88,8 +88,8 @@ namespace ams::ncm { MAKE_SERVICE_COMMAND_META(HasContent), MAKE_SERVICE_COMMAND_META(ListContentMetaInfo), MAKE_SERVICE_COMMAND_META(GetAttributes), - MAKE_SERVICE_COMMAND_META(GetRequiredApplicationVersion, hos::Version_200), - MAKE_SERVICE_COMMAND_META(GetContentIdByTypeAndIdOffset, hos::Version_500), + MAKE_SERVICE_COMMAND_META(GetRequiredApplicationVersion, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(GetContentIdByTypeAndIdOffset, hos::Version_5_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp b/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp index 6e40714b..f310278a 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp +++ b/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp @@ -110,20 +110,20 @@ namespace ams::ncm { MAKE_SERVICE_COMMAND_META(ListContentId), MAKE_SERVICE_COMMAND_META(GetSizeFromContentId), MAKE_SERVICE_COMMAND_META(DisableForcibly), - MAKE_SERVICE_COMMAND_META(RevertToPlaceHolder, hos::Version_200), - MAKE_SERVICE_COMMAND_META(SetPlaceHolderSize, hos::Version_200), - MAKE_SERVICE_COMMAND_META(ReadContentIdFile, hos::Version_200), - MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdDeprecated, hos::Version_200, hos::Version_200), - MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderId, hos::Version_300), - MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentIdDeprecated, hos::Version_200, hos::Version_200), - MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentId, hos::Version_300), - MAKE_SERVICE_COMMAND_META(WriteContentForDebug, hos::Version_200), - MAKE_SERVICE_COMMAND_META(GetFreeSpaceSize, hos::Version_200), - MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize, hos::Version_200), - MAKE_SERVICE_COMMAND_META(FlushPlaceHolder, hos::Version_300), - MAKE_SERVICE_COMMAND_META(GetSizeFromPlaceHolderId, hos::Version_400), - MAKE_SERVICE_COMMAND_META(RepairInvalidFileAttribute, hos::Version_400), - MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdWithCache, hos::Version_800), + MAKE_SERVICE_COMMAND_META(RevertToPlaceHolder, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(SetPlaceHolderSize, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(ReadContentIdFile, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdDeprecated, hos::Version_2_0_0, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderId, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentIdDeprecated, hos::Version_2_0_0, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentId, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(WriteContentForDebug, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(GetFreeSpaceSize, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize, hos::Version_2_0_0), + MAKE_SERVICE_COMMAND_META(FlushPlaceHolder, hos::Version_3_0_0), + MAKE_SERVICE_COMMAND_META(GetSizeFromPlaceHolderId, hos::Version_4_0_0), + MAKE_SERVICE_COMMAND_META(RepairInvalidFileAttribute, hos::Version_4_0_0), + MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdWithCache, hos::Version_8_0_0), }; }; diff --git a/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp b/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp index 1f37b0fe..bf2e86a7 100644 --- a/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp +++ b/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp @@ -43,7 +43,7 @@ namespace ams::psc::sf { MAKE_SERVICE_COMMAND_META(GetRequest), MAKE_SERVICE_COMMAND_META(Acknowledge), MAKE_SERVICE_COMMAND_META(Finalize), - MAKE_SERVICE_COMMAND_META(AcknowledgeEx, hos::Version_600), /* TODO: This is really 5.1.0... */ + MAKE_SERVICE_COMMAND_META(AcknowledgeEx, hos::Version_6_0_0), /* TODO: This is really 5.1.0... */ }; }; diff --git a/libstratosphere/source/boot2/boot2_api.cpp b/libstratosphere/source/boot2/boot2_api.cpp index ded45820..10aed678 100644 --- a/libstratosphere/source/boot2/boot2_api.cpp +++ b/libstratosphere/source/boot2/boot2_api.cpp @@ -308,7 +308,7 @@ namespace ams::boot2 { /* Wait for other atmosphere mitm modules to initialize. */ R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("set:sys"))); - if (hos::GetVersion() >= hos::Version_200) { + if (hos::GetVersion() >= hos::Version_2_0_0) { R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("bpc"))); } else { R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("bpc:c"))); @@ -337,7 +337,7 @@ namespace ams::boot2 { if (maintenance) { LaunchList(AdditionalMaintenanceLaunchPrograms, NumAdditionalMaintenanceLaunchPrograms); /* Starting in 7.0.0, npns is launched during maintenance boot. */ - if (hos::GetVersion() >= hos::Version_700) { + if (hos::GetVersion() >= hos::Version_7_0_0) { LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Npns, ncm::StorageId::BuiltInSystem), 0); } } else { diff --git a/libstratosphere/source/cfg/cfg_privileged_process.cpp b/libstratosphere/source/cfg/cfg_privileged_process.cpp index b941208c..1df518d0 100644 --- a/libstratosphere/source/cfg/cfg_privileged_process.cpp +++ b/libstratosphere/source/cfg/cfg_privileged_process.cpp @@ -33,11 +33,11 @@ namespace ams::cfg { /* SD card helpers. */ void GetPrivilegedProcessIdRange(os::ProcessId *out_min, os::ProcessId *out_max) { os::ProcessId min = os::InvalidProcessId, max = os::InvalidProcessId; - if (hos::GetVersion() >= hos::Version_500) { + if (hos::GetVersion() >= hos::Version_5_0_0) { /* On 5.0.0+, we can get precise limits from svcGetSystemInfo. */ R_ABORT_UNLESS(svcGetSystemInfo(reinterpret_cast(&min), SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum)); R_ABORT_UNLESS(svcGetSystemInfo(reinterpret_cast(&max), SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum)); - } else if (hos::GetVersion() >= hos::Version_400) { + } else if (hos::GetVersion() >= hos::Version_4_0_0) { /* On 4.0.0-4.1.0, we can get the precise limits from normal svcGetInfo. */ R_ABORT_UNLESS(svcGetInfo(reinterpret_cast(&min), InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum)); R_ABORT_UNLESS(svcGetInfo(reinterpret_cast(&max), InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum)); diff --git a/libstratosphere/source/erpt/srv/erpt_srv_main.cpp b/libstratosphere/source/erpt/srv/erpt_srv_main.cpp index 655558be..87bf4f78 100644 --- a/libstratosphere/source/erpt/srv/erpt_srv_main.cpp +++ b/libstratosphere/source/erpt/srv/erpt_srv_main.cpp @@ -40,7 +40,7 @@ namespace ams::erpt::srv { R_TRY(fs::GetSaveDataAvailableSize(std::addressof(cur_savedata_size), SystemSaveDataId)); if (cur_journal_size < SystemSaveDataJournalSize || cur_savedata_size < SystemSaveDataSize) { - if (hos::GetVersion() >= hos::Version_300) { + if (hos::GetVersion() >= hos::Version_3_0_0) { R_TRY(fs::ExtendSaveData(fs::SaveDataSpaceId::System, SystemSaveDataId, SystemSaveDataSize, SystemSaveDataJournalSize)); } } diff --git a/libstratosphere/source/erpt/srv/erpt_srv_reporter.cpp b/libstratosphere/source/erpt/srv/erpt_srv_reporter.cpp index 6d333097..8d72978a 100644 --- a/libstratosphere/source/erpt/srv/erpt_srv_reporter.cpp +++ b/libstratosphere/source/erpt/srv/erpt_srv_reporter.cpp @@ -67,7 +67,7 @@ namespace ams::erpt::srv { Result Reporter::CollectUniqueReportFields() { this->occurrence_tick = os::GetSystemTick(); - if (hos::GetVersion() >= hos::Version_300) { + if (hos::GetVersion() >= hos::Version_3_0_0) { this->steady_clock_internal_offset_seconds = time::GetStandardSteadyClockInternalOffset().GetSeconds(); } else { this->steady_clock_internal_offset_seconds = 0; diff --git a/libstratosphere/source/fs/fs_signed_system_partition.cpp b/libstratosphere/source/fs/fs_signed_system_partition.cpp index c41bcf9e..fb54ec8f 100644 --- a/libstratosphere/source/fs/fs_signed_system_partition.cpp +++ b/libstratosphere/source/fs/fs_signed_system_partition.cpp @@ -37,7 +37,7 @@ namespace ams::fs { bool IsSignedSystemPartitionOnSdCardValidDeprecated() { /* Ensure we only call with correct version. */ auto version = hos::GetVersion(); - AMS_ABORT_UNLESS(hos::Version_400 <= version && version < hos::Version_800); + AMS_ABORT_UNLESS(hos::Version_4_0_0 <= version && version < hos::Version_8_0_0); /* Check that the partition is valid. */ bool is_valid; diff --git a/libstratosphere/source/hos/hos_version_api.cpp b/libstratosphere/source/hos/hos_version_api.cpp index 113ae1ca..4f9530ea 100644 --- a/libstratosphere/source/hos/hos_version_api.cpp +++ b/libstratosphere/source/hos/hos_version_api.cpp @@ -37,37 +37,37 @@ namespace ams::hos { switch (exosphere::GetApiInfo().GetTargetFirmware()) { case exosphere::TargetFirmware_100: - g_hos_version = hos::Version_100; + g_hos_version = hos::Version_1_0_0; break; case exosphere::TargetFirmware_200: - g_hos_version = hos::Version_200; + g_hos_version = hos::Version_2_0_0; break; case exosphere::TargetFirmware_300: - g_hos_version = hos::Version_300; + g_hos_version = hos::Version_3_0_0; break; case exosphere::TargetFirmware_400: - g_hos_version = hos::Version_400; + g_hos_version = hos::Version_4_0_0; break; case exosphere::TargetFirmware_500: - g_hos_version = hos::Version_500; + g_hos_version = hos::Version_5_0_0; break; case exosphere::TargetFirmware_600: case exosphere::TargetFirmware_620: - g_hos_version = hos::Version_600; + g_hos_version = hos::Version_6_0_0; break; case exosphere::TargetFirmware_700: - g_hos_version = hos::Version_700; + g_hos_version = hos::Version_7_0_0; break; case exosphere::TargetFirmware_800: - g_hos_version = hos::Version_800; + g_hos_version = hos::Version_8_0_0; break; case exosphere::TargetFirmware_810: - g_hos_version = hos::Version_810; + g_hos_version = hos::Version_8_1_0; break; case exosphere::TargetFirmware_900: - g_hos_version = hos::Version_900; + g_hos_version = hos::Version_9_0_0; case exosphere::TargetFirmware_910: - g_hos_version = hos::Version_910; + g_hos_version = hos::Version_9_1_0; break; AMS_UNREACHABLE_DEFAULT_CASE(); } @@ -85,56 +85,56 @@ namespace ams::hos { void SetVersionForLibnx() { u32 major = 0, minor = 0, micro = 0; switch (hos::GetVersion()) { - case hos::Version_100: + case hos::Version_1_0_0: major = 1; minor = 0; micro = 0; break; - case hos::Version_200: + case hos::Version_2_0_0: major = 2; minor = 0; micro = 0; break; - case hos::Version_300: + case hos::Version_3_0_0: major = 3; minor = 0; micro = 0; break; - case hos::Version_400: + case hos::Version_4_0_0: major = 4; minor = 0; micro = 0; break; - case hos::Version_500: + case hos::Version_5_0_0: major = 5; minor = 0; micro = 0; break; - case hos::Version_600: + case hos::Version_6_0_0: major = 6; minor = 0; micro = 0; break; - case hos::Version_700: + case hos::Version_7_0_0: major = 7; minor = 0; micro = 0; break; - case hos::Version_800: + case hos::Version_8_0_0: major = 8; minor = 0; micro = 0; break; - case hos::Version_810: + case hos::Version_8_1_0: major = 8; minor = 1; micro = 0; break; - case hos::Version_900: + case hos::Version_9_0_0: major = 9; minor = 0; micro = 0; - case hos::Version_910: + case hos::Version_9_1_0: major = 9; minor = 1; micro = 0; diff --git a/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp b/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp index c80238a3..17c7a0c1 100644 --- a/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp +++ b/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp @@ -26,7 +26,7 @@ namespace ams::lr { /* Storage for RegisteredData entries by data id. */ RegisteredStorages registered_storages; public: - AddOnContentLocationResolverImpl() : registered_storages(hos::GetVersion() < hos::Version_900 ? 0x800 : 0x2) { /* ... */ } + AddOnContentLocationResolverImpl() : registered_storages(hos::GetVersion() < hos::Version_9_0_0 ? 0x800 : 0x2) { /* ... */ } /* Actual commands. */ virtual Result ResolveAddOnContentPath(sf::Out out, ncm::DataId id) override; diff --git a/libstratosphere/source/lr/lr_registered_location_resolver_impl.cpp b/libstratosphere/source/lr/lr_registered_location_resolver_impl.cpp index d499c142..54f90b22 100644 --- a/libstratosphere/source/lr/lr_registered_location_resolver_impl.cpp +++ b/libstratosphere/source/lr/lr_registered_location_resolver_impl.cpp @@ -59,7 +59,7 @@ namespace ams::lr { Result RegisteredLocationResolverImpl::RefreshImpl(const ncm::ProgramId *excluding_ids, size_t num_ids) { /* On < 9.0.0, exclusion lists were not supported yet, so simply clear and return. */ - if (hos::GetVersion() < hos::Version_900) { + if (hos::GetVersion() < hos::Version_9_0_0) { this->ClearRedirections(); return ResultSuccess(); } diff --git a/libstratosphere/source/lr/lr_registered_location_resolver_impl.hpp b/libstratosphere/source/lr/lr_registered_location_resolver_impl.hpp index a5d9837e..1a5ea699 100644 --- a/libstratosphere/source/lr/lr_registered_location_resolver_impl.hpp +++ b/libstratosphere/source/lr/lr_registered_location_resolver_impl.hpp @@ -28,7 +28,7 @@ namespace ams::lr { static_assert(MaxRegisteredLocations >= MaxRegisteredLocationsDeprecated); private: static ALWAYS_INLINE size_t GetMaxRegisteredLocations() { - if (hos::GetVersion() >= hos::Version_900) { + if (hos::GetVersion() >= hos::Version_9_0_0) { return MaxRegisteredLocations; } else { return MaxRegisteredLocationsDeprecated; diff --git a/libstratosphere/source/map/map_api.cpp b/libstratosphere/source/map/map_api.cpp index 04b56049..5c3bdf0f 100644 --- a/libstratosphere/source/map/map_api.cpp +++ b/libstratosphere/source/map/map_api.cpp @@ -163,7 +163,7 @@ namespace ams::map { R_TRY(svcGetInfo(&out->heap_size, InfoType_HeapRegionSize, process_h, 0)); R_TRY(svcGetInfo(&out->alias_base, InfoType_AliasRegionAddress, process_h, 0)); R_TRY(svcGetInfo(&out->alias_size, InfoType_AliasRegionSize, process_h, 0)); - if (hos::GetVersion() >= hos::Version_200) { + if (hos::GetVersion() >= hos::Version_2_0_0) { R_TRY(svcGetInfo(&out->aslr_base, InfoType_AslrRegionAddress, process_h, 0)); R_TRY(svcGetInfo(&out->aslr_size, InfoType_AslrRegionSize, process_h, 0)); } else { @@ -184,7 +184,7 @@ namespace ams::map { } Result LocateMappableSpace(uintptr_t *out_address, size_t size) { - if (hos::GetVersion() >= hos::Version_200) { + if (hos::GetVersion() >= hos::Version_2_0_0) { return LocateMappableSpaceModern(out_address, size); } else { return LocateMappableSpaceDeprecated(out_address, size); @@ -192,7 +192,7 @@ namespace ams::map { } Result MapCodeMemoryInProcess(MappedCodeMemory &out_mcm, Handle process_handle, uintptr_t base_address, size_t size) { - if (hos::GetVersion() >= hos::Version_200) { + if (hos::GetVersion() >= hos::Version_2_0_0) { return MapCodeMemoryInProcessModern(out_mcm, process_handle, base_address, size); } else { return MapCodeMemoryInProcessDeprecated(out_mcm, process_handle, base_address, size); diff --git a/libstratosphere/source/ncm/ncm_api.cpp b/libstratosphere/source/ncm/ncm_api.cpp index 7dbed826..b2c3e2d9 100644 --- a/libstratosphere/source/ncm/ncm_api.cpp +++ b/libstratosphere/source/ncm/ncm_api.cpp @@ -101,12 +101,12 @@ namespace ams::ncm { /* Deprecated API. */ Result CloseContentStorageForcibly(StorageId storage_id) { - AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_100); + AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_1_0_0); return g_content_manager->CloseContentStorageForcibly(storage_id); } Result CloseContentMetaDatabaseForcibly(StorageId storage_id) { - AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_100); + AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_1_0_0); return g_content_manager->CloseContentMetaDatabaseForcibly(storage_id); } } diff --git a/libstratosphere/source/ncm/ncm_content_manager_impl.cpp b/libstratosphere/source/ncm/ncm_content_manager_impl.cpp index 20bff929..13ad772a 100644 --- a/libstratosphere/source/ncm/ncm_content_manager_impl.cpp +++ b/libstratosphere/source/ncm/ncm_content_manager_impl.cpp @@ -113,11 +113,11 @@ namespace ams::ncm { ALWAYS_INLINE bool IsSignedSystemPartitionOnSdCardValid(const char *bis_mount_name) { /* Signed system partition should never be checked on < 4.0.0, as it did not exist before then. */ - AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_400); + AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_4_0_0); /* If we're importing from system on SD, make sure that the signed system partition is valid. */ const auto version = hos::GetVersion(); - if (version >= hos::Version_800) { + if (version >= hos::Version_8_0_0) { /* On >= 8.0.0, a simpler method was added to check validity. */ /* This also works on < 4.0.0 (though the system partition will never be on-sd there), */ /* and so this will always return false. */ @@ -156,7 +156,7 @@ namespace ams::ncm { R_CATCH(fs::ResultTargetNotFound) { /* On 1.0.0, not all flags existed. Mask when appropriate. */ constexpr u32 SaveDataFlags100Mask = fs::SaveDataFlags_KeepAfterResettingSystemSaveData; - const u32 flags = (hos::GetVersion() >= hos::Version_200) ? (info.flags) : (info.flags & SaveDataFlags100Mask); + const u32 flags = (hos::GetVersion() >= hos::Version_2_0_0) ? (info.flags) : (info.flags & SaveDataFlags100Mask); R_TRY(fs::CreateSystemSaveData(info.space_id, info.id, OwnerId, info.size, info.journal_size, flags)); R_TRY(fs::MountSystemSaveData(mount_name, info.space_id, info.id)); } @@ -275,7 +275,7 @@ namespace ams::ncm { } Result ContentManagerImpl::BuildContentMetaDatabase(StorageId storage_id) { - if (hos::GetVersion() <= hos::Version_400) { + if (hos::GetVersion() <= hos::Version_4_0_0) { /* Temporarily activate the database. */ R_TRY(this->ActivateContentMetaDatabase(storage_id)); ON_SCOPE_EXIT { this->InactivateContentMetaDatabase(storage_id); }; @@ -357,7 +357,7 @@ namespace ams::ncm { /* Ensure correct flags on the BuiltInSystem save data. */ /* NOTE: Nintendo does not check this succeeds, and it does on older system versions. */ /* We will not check the error, either, even though this kind of defeats the call's purpose. */ - if (hos::GetVersion() >= hos::Version_200) { + if (hos::GetVersion() >= hos::Version_2_0_0) { EnsureBuiltInSystemSaveDataFlags(); } @@ -472,7 +472,7 @@ namespace ams::ncm { ContentStorageRoot *root; R_TRY(this->GetContentStorageRoot(std::addressof(root), storage_id)); - if (hos::GetVersion() >= hos::Version_200) { + if (hos::GetVersion() >= hos::Version_2_0_0) { /* Obtain the content storage if already active. */ R_UNLESS(root->content_storage, GetContentStorageNotActiveResult(storage_id)); } else { @@ -493,7 +493,7 @@ namespace ams::ncm { ContentMetaDatabaseRoot *root; R_TRY(this->GetContentMetaDatabaseRoot(&root, storage_id)); - if (hos::GetVersion() >= hos::Version_200) { + if (hos::GetVersion() >= hos::Version_2_0_0) { /* Obtain the content meta database if already active. */ R_UNLESS(root->content_meta_database, GetContentMetaDatabaseNotActiveResult(storage_id)); } else { diff --git a/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp b/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp index 9db289db..bd7a7d06 100644 --- a/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp +++ b/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp @@ -425,7 +425,7 @@ namespace ams::ncm { break; case ContentMetaType::Application: /* As of 9.0.0, applications can be dependent on a specific base application version. */ - AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_900); + AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_9_0_0); required_version = reader.GetExtendedHeader()->required_application_version; break; AMS_UNREACHABLE_DEFAULT_CASE(); diff --git a/libstratosphere/source/ncm/ncm_content_storage_impl.cpp b/libstratosphere/source/ncm/ncm_content_storage_impl.cpp index 8b820c2a..53beb516 100644 --- a/libstratosphere/source/ncm/ncm_content_storage_impl.cpp +++ b/libstratosphere/source/ncm/ncm_content_storage_impl.cpp @@ -58,7 +58,7 @@ namespace ams::ncm { R_SUCCEED_IF(max_level <= 0); /* On 1.0.0, NotRequireFileSize was not a valid open mode. */ - const auto open_dir_mode = hos::GetVersion() >= hos::Version_200 ? (fs::OpenDirectoryMode_All | fs::OpenDirectoryMode_NotRequireFileSize) : (fs::OpenDirectoryMode_All); + const auto open_dir_mode = hos::GetVersion() >= hos::Version_2_0_0 ? (fs::OpenDirectoryMode_All | fs::OpenDirectoryMode_NotRequireFileSize) : (fs::OpenDirectoryMode_All); /* Retry traversal upon request. */ bool retry_dir_read = true; @@ -153,7 +153,7 @@ namespace ams::ncm { } Result CleanDirectoryRecursively(const PathString &path) { - if (hos::GetVersion() >= hos::Version_300) { + if (hos::GetVersion() >= hos::Version_3_0_0) { R_TRY(fs::CleanDirectoryRecursively(path)); } else { /* CleanDirectoryRecursively didn't exist on < 3.0.0, so we will polyfill it. */ diff --git a/libstratosphere/source/ncm/ncm_content_storage_impl_base.hpp b/libstratosphere/source/ncm/ncm_content_storage_impl_base.hpp index a8521edd..7991eeb2 100644 --- a/libstratosphere/source/ncm/ncm_content_storage_impl_base.hpp +++ b/libstratosphere/source/ncm/ncm_content_storage_impl_base.hpp @@ -35,7 +35,7 @@ namespace ams::ncm { } static Result GetRightsId(ncm::RightsId *out_rights_id, const Path &path) { - if (hos::GetVersion() >= hos::Version_300) { + if (hos::GetVersion() >= hos::Version_3_0_0) { R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), std::addressof(out_rights_id->key_generation), path.str)); } else { R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), path.str)); diff --git a/libstratosphere/source/os/impl/os_thread_manager_impl.os.horizon.cpp b/libstratosphere/source/os/impl/os_thread_manager_impl.os.horizon.cpp index 3f3c9553..a9a4039f 100644 --- a/libstratosphere/source/os/impl/os_thread_manager_impl.os.horizon.cpp +++ b/libstratosphere/source/os/impl/os_thread_manager_impl.os.horizon.cpp @@ -129,7 +129,7 @@ namespace ams::os::impl { } void ThreadManagerHorizonImpl::YieldThread() { - if (hos::GetVersion() >= hos::Version_400) { + if (hos::GetVersion() >= hos::Version_4_0_0) { svc::SleepThread(svc::YieldType_WithCoreMigration); } else { svc::SleepThread(svc::YieldType_WithoutCoreMigration); diff --git a/libstratosphere/source/psc/psc_pm_module.os.horizon.cpp b/libstratosphere/source/psc/psc_pm_module.os.horizon.cpp index 4ef5887a..22d947a5 100644 --- a/libstratosphere/source/psc/psc_pm_module.os.horizon.cpp +++ b/libstratosphere/source/psc/psc_pm_module.os.horizon.cpp @@ -60,7 +60,7 @@ namespace ams::psc { R_ABORT_UNLESS(res); R_UNLESS(this->initialized, psc::ResultNotInitialized()); - if (hos::GetVersion() >= hos::Version_600) { + if (hos::GetVersion() >= hos::Version_6_0_0) { return this->intf->AcknowledgeEx(state); } else { return this->intf->Acknowledge(); diff --git a/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp b/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp index d8f08b6f..868ba493 100644 --- a/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp +++ b/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp @@ -20,7 +20,7 @@ namespace ams::sf::cmif { Result impl::ServiceDispatchTableBase::ProcessMessageImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const { /* Get versioning info. */ const auto hos_version = hos::GetVersion(); - const u32 max_cmif_version = hos_version >= hos::Version_500 ? 1 : 0; + const u32 max_cmif_version = hos_version >= hos::Version_5_0_0 ? 1 : 0; /* Parse the CMIF in header. */ const CmifInHeader *in_header = reinterpret_cast(in_raw_data.GetPointer()); @@ -60,7 +60,7 @@ namespace ams::sf::cmif { Result impl::ServiceDispatchTableBase::ProcessMessageForMitmImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const { /* Get versioning info. */ const auto hos_version = hos::GetVersion(); - const u32 max_cmif_version = hos_version >= hos::Version_500 ? 1 : 0; + const u32 max_cmif_version = hos_version >= hos::Version_5_0_0 ? 1 : 0; /* Parse the CMIF in header. */ const CmifInHeader *in_header = reinterpret_cast(in_raw_data.GetPointer());