Print the contents of motd.txt on boot.

This commit is contained in:
Andreas Kling 2018-10-17 12:07:39 +02:00
commit 39fa1eb2c2
Notes: sideshowbarker 2024-07-19 18:47:03 +09:00
5 changed files with 28 additions and 8 deletions

View file

@ -20,6 +20,7 @@
#include <VirtualFileSystem/RandomDevice.h>
#include <VirtualFileSystem/Ext2FileSystem.h>
#include <VirtualFileSystem/VirtualFileSystem.h>
#include <VirtualFileSystem/FileHandle.h>
#include <AK/OwnPtr.h>
#if 0
@ -154,6 +155,16 @@ void init()
vfs->listDirectory("/");
{
auto motdFile = vfs->open("/motd.txt");
ASSERT(motdFile);
auto motdData = motdFile->readEntireFile();
for (unsigned i = 0; i < motdData.size(); ++i) {
kprintf("%c", motdData[i]);
}
}
// The idle task will spend its eternity here for now.
for (;;) {
asm("hlt");