1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:37:44 +00:00

Kernel: Store the kernel command line in a StringView

The Raspberry Pi's mailbox interface does not guarantee that the
returned command line is null-terminated. This commit removes that
assumption from the current code, allowing the next commit to add
support for reading it on the Pi.

This also lets us eliminate a few manual `strlen()` calls :^)
This commit is contained in:
Daniel Bertalan 2023-04-24 20:14:44 +02:00 committed by Andreas Kling
parent c911fb0150
commit 6aa392f6e4
4 changed files with 10 additions and 14 deletions

View file

@ -6,6 +6,7 @@
#pragma once
#include <AK/StringView.h>
#include <Kernel/Multiboot.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/VirtualAddress.h>
@ -28,7 +29,7 @@ extern "C" PhysicalAddress boot_pdpt;
extern "C" PhysicalAddress boot_pd0;
extern "C" PhysicalAddress boot_pd_kernel;
extern "C" Kernel::Memory::PageTableEntry* boot_pd_kernel_pt1023;
extern "C" char const* kernel_cmdline;
extern "C" StringView kernel_cmdline;
extern "C" u32 multiboot_flags;
extern "C" multiboot_memory_map_t* multiboot_memory_map;
extern "C" size_t multiboot_memory_map_count;