From 4e360a4ed7cd77709588b659c704b43d6d474031 Mon Sep 17 00:00:00 2001 From: turret Date: Mon, 29 Sep 2025 00:12:45 -0500 Subject: command: add command decl sys additionally, edit ping to use new abstractions and command declaration facilities. TODO: move interaction create event to somewhere else. this spot isnt too good for it. --- util/command.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 util/command.c (limited to 'util/command.c') 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 + +#include +#include + +#include +#include +#include + +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); -- cgit v1.2.3