feat: moved block dev loop to a daemon task. Fixed bug in string.c and
main loop
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user