hos::Version: rename enum members

This commit is contained in:
Michael Scire
2020-04-13 22:19:44 -07:00
parent 79b9e07ee9
commit 6719abec65
78 changed files with 304 additions and 302 deletions

View File

@@ -110,7 +110,7 @@ namespace ams::ro::impl {
/* Helper functions. */
Result GetCertificationModulus(const u8 **out, u32 key_generation) {
if (hos::GetVersion() >= hos::Version_910) {
if (hos::GetVersion() >= hos::Version_9_1_0) {
R_UNLESS(key_generation <= KeyGenerationMax910, ro::ResultNotAuthorized());
} else {
R_UNLESS(key_generation <= KeyGenerationMax100, ro::ResultNotAuthorized());
@@ -182,7 +182,7 @@ namespace ams::ro::impl {
R_UNLESS(header->GetProgramId() == program_id, ResultInvalidNrr());
/* Check type. */
if (hos::GetVersion() >= hos::Version_700 && enforce_type) {
if (hos::GetVersion() >= hos::Version_7_0_0 && enforce_type) {
R_UNLESS(header->GetType() == expected_type, ResultInvalidNrrType());
}
}

View File

@@ -88,7 +88,7 @@ namespace ams::ro::impl {
}
ncm::ProgramId program_id = ncm::InvalidProgramId;
if (hos::GetVersion() >= hos::Version_300) {
if (hos::GetVersion() >= hos::Version_3_0_0) {
/* 3.0.0+: Use svcGetInfo. */
R_ABORT_UNLESS(svcGetInfo(&program_id.value, InfoType_ProgramId, process_h, 0));
} else {

View File

@@ -64,7 +64,7 @@ void __appInit(void) {
R_ABORT_UNLESS(setsysInitialize());
R_ABORT_UNLESS(fsInitialize());
R_ABORT_UNLESS(splInitialize());
if (hos::GetVersion() < hos::Version_300) {
if (hos::GetVersion() < hos::Version_3_0_0) {
R_ABORT_UNLESS(pminfoInitialize());
}
});
@@ -76,7 +76,7 @@ void __appInit(void) {
void __appExit(void) {
fsExit();
if (hos::GetVersion() < hos::Version_300) {
if (hos::GetVersion() < hos::Version_3_0_0) {
pminfoExit();
}
setsysExit();
@@ -119,7 +119,7 @@ int main(int argc, char **argv)
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::DebugMonitorService>(DebugMonitorServiceName, DebugMonitorMaxSessions)));
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::Service, +MakeRoServiceForSelf>(ForSelfServiceName, ForSelfMaxSessions)));
if (hos::GetVersion() >= hos::Version_700) {
if (hos::GetVersion() >= hos::Version_7_0_0) {
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::Service, +MakeRoServiceForOthers>(ForOthersServiceName, ForOthersMaxSessions)));
}

View File

@@ -54,7 +54,7 @@ namespace ams::ro {
MAKE_SERVICE_COMMAND_META(LoadNrr),
MAKE_SERVICE_COMMAND_META(UnloadNrr),
MAKE_SERVICE_COMMAND_META(Initialize),
MAKE_SERVICE_COMMAND_META(LoadNrrEx, hos::Version_700),
MAKE_SERVICE_COMMAND_META(LoadNrrEx, hos::Version_7_0_0),
};
};