diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-19 15:04:04 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-19 15:04:04 -0400 |
commit | 858a52c06a4615bd58a6a906333f2ad707d41c0a (patch) | |
tree | 16870cd4d67da283567a72a74d28c04464da292a /lib/libjove/error.c | |
parent | 65ba015d6c1f248d36ad01a653bc49637804b15b (diff) | |
download | jove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.tar.gz jove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.tar.bz2 jove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.zip |
usermode pager
Diffstat (limited to 'lib/libjove/error.c')
-rw-r--r-- | lib/libjove/error.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libjove/error.c b/lib/libjove/error.c new file mode 100644 index 0000000..4c0d043 --- /dev/null +++ b/lib/libjove/error.c @@ -0,0 +1,22 @@ +#include <error.h> +#include <kernel/error.h> + +JoveError +jove_error_from_kerror(int kerror) +{ + switch(kerror) { + case KE_OK: + return EJOVE_OK; + case KE_BADMSG: + case KE_BADOBJ: + return EJOVE_BADOBJ; + case KE_BADCALL: + case KE_BADFUNC: + return EJOVE_NOIMPL; + case KE_BADSIZE: + return EJOVE_BADSIZE; + case KE_DNE: + return EJOVE_DNE; + default: return EJOVE_KERROR; + } +} |