s32 __attribute__((weak)) __IOS_LoadStartupIOS() { #if 0 int version; int res; res = __ES_Init(); if(res < 0) return res; version = IOS_GetPreferredVersion(); if(version < 0) { #ifdef DEBUG_IOS printf("GetPreferredVersion failed: %d\n",version); #endif __ES_Close(); return version; } #ifdef DEBUG_IOS printf("Loading startup IOS: %d\n",version); #endif res = __IOS_LaunchNewIOS(version); if(res < 0) return res; #endif return 0; }
s32 IOS_ReloadIOS(int version) { int ret = 0; int res; #ifdef DEBUG_IOS printf("Reloading to IOS%d\n",version); #endif res = __IOS_ShutdownSubsystems(); if(res < 0) { #ifdef DEBUG_IOS printf("__IOS_ShutdownSubsystems failed: %d\n", res); #endif ret = res; } res = __ES_Init(); if(res < 0) { #ifdef DEBUG_IOS printf("__ES_Init failed: %d\n", res); #endif ret = res; } else { res = __IOS_LaunchNewIOS(version); if(res < 0) { #ifdef DEBUG_IOS printf("__IOS_LaunchNewIOS failed: %d\n", res); #endif ret = res; __ES_Close(); } } res = __IOS_InitializeSubsystems(); if(res < 0) { #ifdef DEBUG_IOS printf("__IOS_InitializeSubsystems failed: %d\n", res); #endif ret = res; } return ret; }