From ac947d45c288f62e927895afe7cd6a722ffdd8f8 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 30 Nov 2019 16:21:57 +0100 Subject: Replaced vesa print functions with printf --- src/kernel/commands/command.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/kernel/commands/command.c') diff --git a/src/kernel/commands/command.c b/src/kernel/commands/command.c index 9b6060e..c85356b 100644 --- a/src/kernel/commands/command.c +++ b/src/kernel/commands/command.c @@ -5,6 +5,7 @@ #include #include #include +#include int32_t starts_with(const char *a, const char *b) { @@ -16,24 +17,23 @@ int32_t starts_with(const char *a, const char *b) void exec_command(char *command) { if (starts_with(command, "ls")) - vesa_draw_string("Listing files\n"); + printf("Listing files\n"); else if (starts_with(command, "help")) - vesa_draw_string("I can't help you write now\n"); + printf("I can't help you write now\n"); else if (starts_with(command, "ping")) - vesa_draw_string("pong!\n"); + printf("pong!\n"); else if (starts_with(command, "clear")) vesa_clear(); else if (starts_with(command, "shutdown") || starts_with(command, "exit")) acpi_poweroff(); else if (starts_with(command, "zzz")) - vesa_draw_string("Not implemented\n"); - else if (starts_with(command, "time")) { - vesa_draw_number((int) get_time()); - vesa_draw_string("\n"); - } else if (starts_with(command, "date")) + printf("Not implemented\n"); + else if (starts_with(command, "time")) + printf("%d\n", (int) get_time()); + else if (starts_with(command, "date")) write_time(); else if (starts_with(command, "reboot")) reboot(); else if (command[0] != 0) - vesa_draw_string("Command not found!\n"); + warn("Command not found!"); } -- cgit v1.2.3