aboutsummaryrefslogtreecommitdiffstats
path: root/util/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/command.c')
-rw-r--r--util/command.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/util/command.c b/util/command.c
new file mode 100644
index 0000000..57a0bc1
--- /dev/null
+++ b/util/command.c
@@ -0,0 +1,17 @@
+#include <stddef.h>
+
+#include <cJSON.h>
+#include <stb_ds.h>
+
+#include <dbs/commands.h>
+#include <dbs/init.h>
+#include <dbs/log.h>
+
+Command *commands = NULL;
+
+void register_commands() {
+ for(int i = 0; i < arrlen(commands); ++i) {
+ print("command %s: %s (@%x)", commands[i].name, commands[i].description, (long long)commands[i].callback);
+ }
+}
+l4_initcall(register_commands);