[Mammoth] clean up check crash (we log the error code in the kernel.

This commit is contained in:
Drew Galbraith 2023-11-25 13:07:59 -08:00
parent 24bcff2e40
commit 7151a509ee
1 changed files with 3 additions and 18 deletions

View File

@ -8,25 +8,10 @@ void dbgln(glcr::StringView string) {
}
void check(uint64_t code) {
switch (code) {
case glcr::OK:
return;
case glcr::UNIMPLEMENTED:
dbgln("crash: UNIMPLEMENTED");
break;
case glcr::CAP_NOT_FOUND:
dbgln("crash: missing capability");
break;
case glcr::CAP_WRONG_TYPE:
dbgln("crash: capability of the wrong type");
break;
case glcr::CAP_PERMISSION_DENIED:
dbgln("crash: capability permissions error");
break;
default:
dbgln("Unhandled code");
break;
if (code == glcr::OK) {
return;
}
dbgln("crash!");
(void)ZProcessExit(code);
}