Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: check range and add type invariant to Error
We will need to make sure that no Error with out of range error code can be constructed. This commit 1. Add errno check in from_kernel_errno() 2. Provides a unchecked version from_kernel_errno_unchecked() And when an invalid errno is found, it will 1) Print a warning. 2) Convert it to EINVAL. Signed-off-by: Fox Chen <[email protected]>
- Loading branch information