mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel: Make map_typed() & map_typed_writable() fallible using ErrorOr
This mostly just moved the problem, as a lot of the callers are not capable of propagating the errors themselves, but it's a step in the right direction.
This commit is contained in:
committed by
Andreas Kling
parent
e2e5d4da16
commit
fb3e46e930
@@ -25,8 +25,10 @@ UNMAP_AFTER_INIT void initialize()
|
||||
auto facp = StaticParsing::find_table(rsdp.value(), "FACP");
|
||||
if (!facp.has_value())
|
||||
return;
|
||||
auto facp_table = Memory::map_typed<Structures::FADT>(facp.value());
|
||||
u8 irq_line = facp_table->sci_int;
|
||||
auto facp_table_or_error = Memory::map_typed<Structures::FADT>(facp.value());
|
||||
if (facp_table_or_error.is_error())
|
||||
return;
|
||||
u8 irq_line = facp_table_or_error.value()->sci_int;
|
||||
|
||||
Parser::must_initialize(rsdp.value(), facp.value(), irq_line);
|
||||
if (kernel_command_line().acpi_feature_level() == AcpiFeatureLevel::Enabled)
|
||||
|
||||
Reference in New Issue
Block a user