feat: moved block dev loop to a daemon task. Fixed bug in string.c and

main loop
This commit is contained in:
2021-03-01 21:42:35 +01:00
parent 990b850c43
commit 76792dd6fd
7 changed files with 32 additions and 21 deletions

View File

@@ -42,10 +42,10 @@ void echo(const char *arg);
void help(const char *arg);
cmd_handler cmd_handlers[] = {
{"help", help},
{"echo", echo},
{"print", print},
{"ide", ide},
{"help\0", help},
{"echo\0", echo},
{"print\0", print},
{"ide\0", ide},
{NULL, NULL},
};
@@ -127,8 +127,9 @@ void store_bootloader_info(multiboot_info_t *multiboot_info) {
void noreturn main_loop(void* data) {
while (true) {
char *msg = readline(NULL);
char *args = strchr(msg, ' ') + 1;
args[-1] = 0;
char *args = strchr(msg, ' ');
args[0] = 0;
args = &args[1];
int test_index = 0;
while (true) {
if (cmd_handlers[test_index].cmd == 0) {