mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +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:
parent
e2e5d4da16
commit
fb3e46e930
14 changed files with 80 additions and 57 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue