forked from Smithay/udev-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The error struct defined by the udev crate doesn't really seem to add any value over simply using std::io::Error directly and doesn't give great error messages either. Switch over to simply using std::io:Error directly as well as changing the try_alloc! over to get the value of errno rather then always returning ENOMEM on failure. When debugging the failure of creating monitoring sockets this changed the error reporting from: Error: Custom { kind: Other, error: "Unknown error -12" } to: Error: Os { code: 22, kind: InvalidInput, message: "Invalid argument" } Which is a lot more meaningful. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
- Loading branch information
1 parent
92374a7
commit 484ad6a
Showing
6 changed files
with
10 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters