#include <stdint.h>
#include <stddef.h>
#include <ulib.h>

#define CMDS(X)                 \
  X(ls)

void main(void) {
  if (argslen() == 0) {
    return;
  }

  char *cmd = args()[0];

  #define X(name) if (string_strcmp(cmd, #name) == 0) { \
    extern void dev_ ## name(void); \
    dev_ ## name(); \
    return; \
  }
  CMDS(X)
  #undef X

  uprintf("dev: unknown command %s\n", cmd);
}
