From 53d7281e6602fb27731781d53a59137985c53a16 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 21 Jun 2019 17:37:01 -0700 Subject: [PATCH] sm: use enums for GetInfo --- stratosphere/sm/source/sm_main.cpp | 16 ++++++++-------- stratosphere/sm/source/sm_service_manager.cpp | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/stratosphere/sm/source/sm_main.cpp b/stratosphere/sm/source/sm_main.cpp index 3dac7bf64..dd8f3aebb 100644 --- a/stratosphere/sm/source/sm_main.cpp +++ b/stratosphere/sm/source/sm_main.cpp @@ -54,15 +54,15 @@ void __libnx_exception_handler(ThreadExceptionDump *ctx) { void __libnx_initheap(void) { - void* addr = nx_inner_heap; - size_t size = nx_inner_heap_size; + void* addr = nx_inner_heap; + size_t size = nx_inner_heap_size; - /* Newlib */ - extern char* fake_heap_start; - extern char* fake_heap_end; + /* Newlib */ + extern char* fake_heap_start; + extern char* fake_heap_end; - fake_heap_start = (char*)addr; - fake_heap_end = (char*)addr + size; + fake_heap_start = (char*)addr; + fake_heap_end = (char*)addr + size; } void __appInit(void) { @@ -100,5 +100,5 @@ int main(int argc, char **argv) s_server_manager.Process(); /* Cleanup. */ - return 0; + return 0; } diff --git a/stratosphere/sm/source/sm_service_manager.cpp b/stratosphere/sm/source/sm_service_manager.cpp index ab26726db..7dee60a35 100644 --- a/stratosphere/sm/source/sm_service_manager.cpp +++ b/stratosphere/sm/source/sm_service_manager.cpp @@ -158,12 +158,12 @@ namespace sts::sm { InitialProcessIdLimits() { if (GetRuntimeFirmwareVersion() >= FirmwareVersion_500) { /* On 5.0.0+, we can get precise limits from svcGetSystemInfo. */ - R_ASSERT(svcGetSystemInfo(&this->min, 2, 0, 0)); - R_ASSERT(svcGetSystemInfo(&this->max, 2, 0, 1)); + R_ASSERT(svcGetSystemInfo(&this->min, SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum)); + R_ASSERT(svcGetSystemInfo(&this->max, SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum)); } else if (GetRuntimeFirmwareVersion() >= FirmwareVersion_400) { /* On 4.0.0-4.1.0, we can get the precise limits from normal svcGetInfo. */ - R_ASSERT(svcGetInfo(&this->min, 19, 0, 0)); - R_ASSERT(svcGetInfo(&this->max, 19, 0, 1)); + R_ASSERT(svcGetInfo(&this->min, InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum)); + R_ASSERT(svcGetInfo(&this->max, InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum)); } else { /* On < 4.0.0, we just use hardcoded extents. */ this->min = InitialProcessIdMin;