aboutsummaryrefslogtreecommitdiffstats
path: root/util/command.c
blob: 57a0bc1a6a32f43deb597f5d13da1dd2708fc7c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);