1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:38:12 +00:00

Kernel: Add KParams class for accessing kernel cmdline parameters (#188)

This commit is contained in:
Conrad Pankoff 2019-06-04 20:54:27 +10:00 committed by Andreas Kling
parent 042895317d
commit 738f9de9a9
5 changed files with 59 additions and 3 deletions

View file

@ -28,6 +28,7 @@
#include <Kernel/Net/NetworkTask.h>
#include <Kernel/Devices/DebugLogDevice.h>
#include <Kernel/Multiboot.h>
#include <Kernel/KParams.h>
//#define STRESS_TEST_SPAWNING
@ -123,13 +124,14 @@ multiboot_info_t* multiboot_info_ptr;
extern "C" [[noreturn]] void init()
{
kprintf("Kernel command line: '%s'\n", multiboot_info_ptr->cmdline);
sse_init();
kmalloc_init();
init_ksyms();
// must come after kmalloc_init because we use AK_MAKE_ETERNAL in KParams
new KParams(String(reinterpret_cast<const char*>(multiboot_info_ptr->cmdline)));
vfs = new VFS;
dev_debuglog = new DebugLogDevice;