aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/commands
diff options
context:
space:
mode:
authorMarvin Borner2019-10-28 15:49:45 +0100
committerMarvin Borner2019-10-28 15:49:45 +0100
commit644d9da7c883e7bef4598254fa0679a3cea5f001 (patch)
treef7633f6aec9e5e8257bf29d1c89329b2354889de /src/kernel/commands
parent00cfe0fbe1c80f535ff31beba598770064f13f12 (diff)
Added cmos based rtc date & time
Diffstat (limited to 'src/kernel/commands')
-rw-r--r--src/kernel/commands/command.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kernel/commands/command.c b/src/kernel/commands/command.c
index 8ddbb08..2334219 100644
--- a/src/kernel/commands/command.c
+++ b/src/kernel/commands/command.c
@@ -2,6 +2,8 @@
#include <kernel/io/io.h>
#include <kernel/acpi/acpi.h>
#include <kernel/graphics/vesa.h>
+#include <kernel/cmos/rtc.h>
+#include <kernel/timer/timer.h>
int32_t starts_with(const char *a, const char *b) {
size_t length_pre = strlen(b);
@@ -22,6 +24,11 @@ void exec_command(char *command) {
acpi_poweroff();
else if (starts_with(command, "zzz"))
vesa_draw_string("Not implemented\n");
+ else if (starts_with(command, "time")) {
+ vesa_draw_number(get_time());
+ vesa_draw_string("\n");
+ } else if (starts_with(command, "date"))
+ write_time();
else if (starts_with(command, "reboot"))
reboot();
else