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:
parent
2715f91c92
commit
2d1719da73
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue