summaryrefslogtreecommitdiff
path: root/src/user/app/shell/builtins.h
diff options
context:
space:
mode:
authordzwdz2022-07-31 17:09:05 +0200
committerdzwdz2022-07-31 20:56:52 +0200
commit70948d9a9ec613b17c2cdff9e76b5b35f40565ac (patch)
tree5c2b0b6444369b8019c34abcae66244589eb6446 /src/user/app/shell/builtins.h
parent40674fa5469c7af09095d5dd5cca8eccc728561c (diff)
user/shell: use an array of function pointers for the builtins
Diffstat (limited to 'src/user/app/shell/builtins.h')
-rw-r--r--src/user/app/shell/builtins.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/user/app/shell/builtins.h b/src/user/app/shell/builtins.h
index bb52cef..aa2cd8c 100644
--- a/src/user/app/shell/builtins.h
+++ b/src/user/app/shell/builtins.h
@@ -2,6 +2,9 @@
#include <camellia/syscalls.h>
#include <stdbool.h>
-void cmd_cat_ls(const char *args, bool ls);
-void cmd_hexdump(const char *args);
-void cmd_touch(const char *args);
+struct builtin {
+ const char *name;
+ void (*fn)(int argc, const char **argv);
+};
+
+extern struct builtin builtins[];