From 858a52c06a4615bd58a6a906333f2ad707d41c0a Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Tue, 19 Aug 2025 15:04:04 -0400 Subject: usermode pager --- lib/libjove/error.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/libjove/error.c (limited to 'lib/libjove/error.c') 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 +#include + +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; + } +} -- cgit v1.2.1