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:
parent
705832f387
commit
39fa1eb2c2
5 changed files with 28 additions and 8 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue