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

Kernel/Net: Don't try to enumerate PCI adapters if PCI is disabled

This commit is contained in:
Liav A 2022-01-21 16:09:47 +02:00 committed by Andreas Kling
parent b849e4f907
commit 71de4f7114

View file

@ -111,7 +111,7 @@ UNMAP_AFTER_INIT RefPtr<NetworkAdapter> NetworkingManagement::determine_network_
bool NetworkingManagement::initialize()
{
if (!kernel_command_line().is_physical_networking_disabled()) {
if (!kernel_command_line().is_physical_networking_disabled() && !PCI::Access::is_disabled()) {
PCI::enumerate([&](PCI::DeviceIdentifier const& device_identifier) {
// Note: PCI class 2 is the class of Network devices
if (device_identifier.class_code().value() != 0x02)