1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

Kernel/SysFS: Mark SysFSDirectory traverse and lookup methods as final

This enforces us to remove duplicated code across the SysFS code. This
results in great simplification of how the SysFS works now, because we
enforce one way to treat SysFSDirectory objects.
This commit is contained in:
Liav A 2022-04-23 01:06:37 +03:00 committed by Andreas Kling
parent 6733f19b3c
commit 70afa0b171
18 changed files with 114 additions and 178 deletions

View file

@ -58,8 +58,11 @@ void BIOSSysFSDirectory::create_components()
dbgln("BIOSSysFSDirectory: invalid smbios structure table length");
return;
}
m_components.append(BIOSSysFSComponent::must_create(BIOSSysFSComponent::Type::DMIEntryPoint, m_dmi_entry_point, m_dmi_entry_point_length));
m_components.append(BIOSSysFSComponent::must_create(BIOSSysFSComponent::Type::SMBIOSTable, m_smbios_structure_table, m_smbios_structure_table_length));
MUST(m_child_components.with([&](auto& list) -> ErrorOr<void> {
list.append(BIOSSysFSComponent::must_create(BIOSSysFSComponent::Type::DMIEntryPoint, m_dmi_entry_point, m_dmi_entry_point_length));
list.append(BIOSSysFSComponent::must_create(BIOSSysFSComponent::Type::SMBIOSTable, m_smbios_structure_table, m_smbios_structure_table_length));
return {};
}));
}
UNMAP_AFTER_INIT void BIOSSysFSDirectory::initialize_dmi_exposer()