mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 08:22:55 +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
Notes:
sideshowbarker
2024-07-17 00:35:00 +09:00
Author: https://github.com/supercomputer7
Commit: 2d1719da73
Pull-request: https://github.com/SerenityOS/serenity/pull/17308
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg
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