1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:55:06 +00:00

Print the contents of motd.txt on boot.

This commit is contained in:
Andreas Kling 2018-10-17 12:07:39 +02:00
parent 705832f387
commit 39fa1eb2c2
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");