From 7238a91977ff090e8ec15d1b4abda9ab0b0a5236 Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 14 Oct 2024 23:09:51 +0200 Subject: [PATCH] Mon 14 Oct 23:09:15 CEST 2024 --- user/test/errcodes.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 user/test/errcodes.c diff --git a/user/test/errcodes.c b/user/test/errcodes.c new file mode 100644 index 0000000..310e042 --- /dev/null +++ b/user/test/errcodes.c @@ -0,0 +1,21 @@ +/* + * errcodes.c + * + * IMPORTANT: must be updated as new enums are added. + * + * Simple test to display all error strings. + */ + +#include "kernel/error.h" +#include "library/errno.h" +#include "library/string.h" + +#define LOWEST_ENUM -13 + +int main(int argc, char ** argv) +{ + for (int i = -1; i >= LOWEST_ENUM; i--) { + printf("%s\n", strerror(i)); + } + return 0; +}