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

Kernel/Net: Propagate proper errno codes from determine_network_device

Returning literal strings is not the proper action here, because we
should always assume that error could be propagated back to userland, so
we need to keep a valid errno when returning an Error.
This commit is contained in:
Liav A 2023-02-04 14:15:37 +02:00 committed by Linus Groh
parent 2715f91c92
commit 2d1719da73

View file

@ -117,7 +117,8 @@ UNMAP_AFTER_INIT ErrorOr<NonnullLockRefPtr<NetworkAdapter>> NetworkingManagement
return adapter;
}
}
return Error::from_string_literal("Unsupported network adapter");
dmesgln("Networking: Failed to initialize device {}, unsupported network adapter", device_identifier.address());
return Error::from_errno(ENODEV);
}
bool NetworkingManagement::initialize()