From 7151a509ee552b91bceaf3cc18a65d2b7798d81a Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Sat, 25 Nov 2023 13:07:59 -0800 Subject: [PATCH] [Mammoth] clean up check crash (we log the error code in the kernel. --- lib/mammoth/util/debug.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/lib/mammoth/util/debug.cpp b/lib/mammoth/util/debug.cpp index 01145d2..ce5907f 100644 --- a/lib/mammoth/util/debug.cpp +++ b/lib/mammoth/util/debug.cpp @@ -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); }