Basic shell

This commit is contained in:
Arnau Camprubí 2022-06-19 19:54:09 +02:00
pare 704e219c6c
commit dc4866b518
S'han modificat 2 arxius amb 16 adicions i 0 eliminacions

13
src/kernel/shell.c Normal file
Veure arxiu

@ -0,0 +1,13 @@
#include "shell.h"
#include "lib/stdio.h"
#include "lib/string.h"
int shell_run(char *cmd){
if(!strcmp(cmd, "HELLO")){
printf("Hello!\n");
}
else{
printf("SHELL: Unknown command \"%s\"\n", cmd);
return 127;
}
}

3
src/kernel/shell.h Normal file
Veure arxiu

@ -0,0 +1,3 @@
#pragma once
int shell_run();