aboutsummaryrefslogtreecommitdiff
path: root/triscv/src/common.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-10-28 00:00:21 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-10-28 00:00:21 +0300
commitd96b8c7d12fc61ec609d6138627b9d6d18139a9a (patch)
tree82bc9a4c2b22de6c021097fb79a57b6d7756a127 /triscv/src/common.c
downloadtri-d96b8c7d12fc61ec609d6138627b9d6d18139a9a.tar.gz
tri-d96b8c7d12fc61ec609d6138627b9d6d18139a9a.zip
move to monorepo
+ Will probably have to make some changes to dir layout to make things make more sense
Diffstat (limited to 'triscv/src/common.c')
-rw-r--r--triscv/src/common.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/triscv/src/common.c b/triscv/src/common.c
new file mode 100644
index 0000000..e73d76e
--- /dev/null
+++ b/triscv/src/common.c
@@ -0,0 +1,13 @@
+#include <triscv/common.h>
+
+static const char *err_strs[] = {
+ [OK] = "OK",
+ [ERR_FULL] = "full",
+ [ERR_EXISTS] = "exists",
+ [ERR_OOB] = "out of bounds"
+};
+
+const char *err_str(stat_t s)
+{
+ return err_strs[s];
+}