From dc912763343ad31f19aa974d3f54393de7b002fa Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Sun, 5 May 2019 17:37:01 +0200 Subject: [PATCH] bug ! --- kaleid/kernel/init/init.c | 20 ++++++++++++-------- kaleid/kernel/io/rtc.c | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index 3b86bbb..ac8948c 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -85,15 +85,19 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) IoPrintRtcTime(); - KernLog("There was %d ticks\n", IoGetRtcTicks()); - uint i = 0; - while (1) { - if (!(i % (2048*5))) IoPrintRtcTime(); - KePauseCPU(); - i++; - } + /* KernLog("There was %d ticks\n", IoGetRtcTicks()); */ + /* uint i = 0; */ + /* while (1) { */ + /* if (!(i % (2048*5))) IoPrintRtcTime(); */ + /* KePauseCPU(); */ + /* i++; */ + /* } */ + + char * cc = IoGetRtcTimeChar(); + + KernLog("End at %s\n", cc); - KernLog("Goodbye after %d ticks\n", IoGetRtcTicks()); // End this machine's suffering + BStdOut->flusher(BStdOut); KeCrashSystem(); } diff --git a/kaleid/kernel/io/rtc.c b/kaleid/kernel/io/rtc.c index e447e96..04136e5 100644 --- a/kaleid/kernel/io/rtc.c +++ b/kaleid/kernel/io/rtc.c @@ -164,8 +164,8 @@ void IoPrintRtcTime(void) char* IoGetRtcTimeChar(void) { Time_t* RtcTime = IoGetRtcTime(); - char* timeChar = ""; - sprintf(timeChar, "[RTC Time] %d/%d/%d ; %d:%d:%d\n", + char* timeChar = ""; + sprintf(timeChar, "%hhd/%hhd/%hd ; %hhd:%hhd:%hhd", RtcTime->day, RtcTime->month, RtcTime->year + RtcTime->century*100,