@@ -24,41 +24,41 @@ use core::str::{self, Utf8Error};
24
24
pub struct Error ( c_types:: c_int ) ;
25
25
26
26
impl Error {
27
- /// Invalid argument .
28
- pub const EINVAL : Self = Error ( -( bindings:: EINVAL as i32 ) ) ;
27
+ /// Operation not permitted .
28
+ pub const EPERM : Self = Error ( -( bindings:: EPERM as i32 ) ) ;
29
29
30
- /// Out of memory .
31
- pub const ENOMEM : Self = Error ( -( bindings:: ENOMEM as i32 ) ) ;
30
+ /// No such file or directory .
31
+ pub const ENOENT : Self = Error ( -( bindings:: ENOENT as i32 ) ) ;
32
32
33
- /// Bad address .
34
- pub const EFAULT : Self = Error ( -( bindings:: EFAULT as i32 ) ) ;
33
+ /// No such process .
34
+ pub const ESRCH : Self = Error ( -( bindings:: ESRCH as i32 ) ) ;
35
35
36
- /// Illegal seek.
37
- pub const ESPIPE : Self = Error ( -( bindings:: ESPIPE as i32 ) ) ;
36
+ /// Interrupted system call.
37
+ pub const EINTR : Self = Error ( -( bindings:: EINTR as i32 ) ) ;
38
+
39
+ /// Bad file number.
40
+ pub const EBADF : Self = Error ( -( bindings:: EBADF as i32 ) ) ;
38
41
39
42
/// Try again.
40
43
pub const EAGAIN : Self = Error ( -( bindings:: EAGAIN as i32 ) ) ;
41
44
42
- /// Device or resource busy.
43
- pub const EBUSY : Self = Error ( -( bindings:: EBUSY as i32 ) ) ;
44
-
45
- /// Restart the system call.
46
- pub const ERESTARTSYS : Self = Error ( -( bindings:: ERESTARTSYS as i32 ) ) ;
45
+ /// Out of memory.
46
+ pub const ENOMEM : Self = Error ( -( bindings:: ENOMEM as i32 ) ) ;
47
47
48
- /// Operation not permitted .
49
- pub const EPERM : Self = Error ( -( bindings:: EPERM as i32 ) ) ;
48
+ /// Bad address .
49
+ pub const EFAULT : Self = Error ( -( bindings:: EFAULT as i32 ) ) ;
50
50
51
- /// No such process .
52
- pub const ESRCH : Self = Error ( -( bindings:: ESRCH as i32 ) ) ;
51
+ /// Device or resource busy .
52
+ pub const EBUSY : Self = Error ( -( bindings:: EBUSY as i32 ) ) ;
53
53
54
- /// No such file or directory .
55
- pub const ENOENT : Self = Error ( -( bindings:: ENOENT as i32 ) ) ;
54
+ /// Invalid argument .
55
+ pub const EINVAL : Self = Error ( -( bindings:: EINVAL as i32 ) ) ;
56
56
57
- /// Interrupted system call .
58
- pub const EINTR : Self = Error ( -( bindings:: EINTR as i32 ) ) ;
57
+ /// Illegal seek .
58
+ pub const ESPIPE : Self = Error ( -( bindings:: ESPIPE as i32 ) ) ;
59
59
60
- /// Bad file number .
61
- pub const EBADF : Self = Error ( -( bindings:: EBADF as i32 ) ) ;
60
+ /// Restart the system call .
61
+ pub const ERESTARTSYS : Self = Error ( -( bindings:: ERESTARTSYS as i32 ) ) ;
62
62
63
63
/// Creates an [`Error`] from a kernel error code.
64
64
///
0 commit comments