stratosphere: TODO: panic -> std::abort()

This commit is contained in:
Michael Scire 2019-05-10 03:28:18 -07:00
parent 41f5b39f6b
commit 03a425a579
7 changed files with 8 additions and 12 deletions

View file

@ -83,7 +83,7 @@ void Utils::InitializeThreadFunc(void *args) {
static const char * const required_active_services[] = {"pcv", "gpio", "pinmux", "psc:c"};
for (unsigned int i = 0; i < sizeof(required_active_services) / sizeof(required_active_services[0]); i++) {
if (R_FAILED(smGetServiceOriginal(&tmp_hnd, smEncodeName(required_active_services[i])))) {
/* TODO: Panic */
std::abort();
} else {
svcCloseHandle(tmp_hnd);
}

@ -1 +1 @@
Subproject commit e8707a6581ecf33a8e35601c8f2e11018bbdc7ec
Subproject commit 8ec43f0d69463784c00ddb19c5f3b043e713548e

View file

@ -73,7 +73,7 @@ class AutoCloseMap {
void Close() {
if (this->mapped_address) {
if (R_FAILED(svcUnmapProcessMemory(this->mapped_address, this->process_handle, this->base_address, this->size))) {
/* TODO: panic(). */
std::abort();
}
this->mapped_address = NULL;
}

View file

@ -207,8 +207,7 @@ Result NsoUtils::CalculateNsoLoadExtents(u32 addspace_type, u32 args_size, NsoLo
addspace_size = 0x7FF8000000ULL;
break;
default:
/* TODO: Panic. */
return ResultKernelOutOfMemory;
std::abort();
}
} else {
if (addspace_type & 2) {

View file

@ -94,8 +94,7 @@ class NsoUtils {
case 12:
return "sdk";
default:
/* TODO: Panic. */
return "?";
std::abort();
}
}

View file

@ -180,7 +180,7 @@ static void MountSdCard() {
static const char * const required_active_services[] = {"pcv", "gpio", "pinmux", "psc:c"};
for (unsigned int i = 0; i < sizeof(required_active_services) / sizeof(required_active_services[0]); i++) {
if (R_FAILED(smGetServiceOriginal(&tmp_hnd, smEncodeName(required_active_services[i])))) {
/* TODO: Panic */
std::abort();
} else {
svcCloseHandle(tmp_hnd);
}

View file

@ -91,8 +91,7 @@ int main(int argc, char **argv)
/* Create sm:m manually. */
Handle smm_h;
if (R_FAILED(Registration::RegisterServiceForSelf(smEncodeName("sm:m"), 1, false, &smm_h))) {
/* TODO: Panic. */
while (1) { }
std::abort();
}
server_manager->AddWaitable(new ExistingPortServer<ManagerService>(smm_h, 1));
@ -101,8 +100,7 @@ int main(int argc, char **argv)
/* Create sm:dmnt manually. */
Handle smdmnt_h;
if (R_FAILED(Registration::RegisterServiceForSelf(smEncodeName("sm:dmnt"), 1, false, &smdmnt_h))) {
/* TODO: Panic. */
while (1) { }
std::abort();
}
server_manager->AddWaitable(new ExistingPortServer<DmntService>(smm_h, 1));;