[Mammoth] clean up check crash (we log the error code in the kernel.
This commit is contained in:
parent
24bcff2e40
commit
7151a509ee
|
@ -8,25 +8,10 @@ void dbgln(glcr::StringView string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void check(uint64_t code) {
|
void check(uint64_t code) {
|
||||||
switch (code) {
|
if (code == glcr::OK) {
|
||||||
case glcr::OK:
|
|
||||||
return;
|
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;
|
|
||||||
}
|
}
|
||||||
|
dbgln("crash!");
|
||||||
(void)ZProcessExit(code);
|
(void)ZProcessExit(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue