|
@@ -5,31 +5,54 @@ use crate::prelude::*;
|
|
|
|
|
|
/// Ext4Error number.
|
|
|
#[repr(i32)]
|
|
|
-#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
|
|
|
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
|
pub enum ErrCode {
|
|
|
- EPERM = 1, /* Operation not permitted */
|
|
|
- ENOENT = 2, /* No such file or directory */
|
|
|
- EIO = 5, /* I/O error */
|
|
|
- ENXIO = 6, /* No such device or address */
|
|
|
- E2BIG = 7, /* Argument list too long */
|
|
|
- ENOMEM = 12, /* Out of memory */
|
|
|
- EACCES = 13, /* Permission denied */
|
|
|
- EFAULT = 14, /* Bad address */
|
|
|
- EEXIST = 17, /* File exists */
|
|
|
- ENODEV = 19, /* No such device */
|
|
|
- ENOTDIR = 20, /* Not a directory */
|
|
|
- EISDIR = 21, /* Is a directory */
|
|
|
- EINVAL = 22, /* Invalid argument */
|
|
|
- EFBIG = 27, /* File too large */
|
|
|
- ENOSPC = 28, /* No space left on device */
|
|
|
- EROFS = 30, /* Read-only file system */
|
|
|
- EMLINK = 31, /* Too many links */
|
|
|
- ERANGE = 34, /* Math result not representable */
|
|
|
- ENOTEMPTY = 39, /* Directory not empty */
|
|
|
- ENODATA = 61, /* No data available */
|
|
|
- ENOTSUP = 95, /* Not supported */
|
|
|
- ELINKFAIL = 97, /* Link failed */
|
|
|
- EALLOCFIAL = 98, /* Inode alloc failed */
|
|
|
+ /// Operation not permitted.
|
|
|
+ EPERM = 1,
|
|
|
+ /// No such file or directory.
|
|
|
+ ENOENT = 2,
|
|
|
+ /// I/O error.
|
|
|
+ EIO = 5,
|
|
|
+ /// No such device or address.
|
|
|
+ ENXIO = 6,
|
|
|
+ /// Argument list too long.
|
|
|
+ E2BIG = 7,
|
|
|
+ /// Out of memory.
|
|
|
+ ENOMEM = 12,
|
|
|
+ /// Permission denied.
|
|
|
+ EACCES = 13,
|
|
|
+ /// Bad address.
|
|
|
+ EFAULT = 14,
|
|
|
+ /// File exists.
|
|
|
+ EEXIST = 17,
|
|
|
+ /// No such device.
|
|
|
+ ENODEV = 19,
|
|
|
+ /// Not a directory.
|
|
|
+ ENOTDIR = 20,
|
|
|
+ /// Is a directory.
|
|
|
+ EISDIR = 21,
|
|
|
+ /// Invalid argument.
|
|
|
+ EINVAL = 22,
|
|
|
+ /// File too large.
|
|
|
+ EFBIG = 27,
|
|
|
+ /// No space left on device.
|
|
|
+ ENOSPC = 28,
|
|
|
+ /// Read-only file system.
|
|
|
+ EROFS = 30,
|
|
|
+ /// Too many links.
|
|
|
+ EMLINK = 31,
|
|
|
+ /// Math result not representable.
|
|
|
+ ERANGE = 34,
|
|
|
+ /// Directory not empty.
|
|
|
+ ENOTEMPTY = 39,
|
|
|
+ /// No data available.
|
|
|
+ ENODATA = 61,
|
|
|
+ /// Not supported.
|
|
|
+ ENOTSUP = 95,
|
|
|
+ /// Link failed.
|
|
|
+ ELINKFAIL = 97,
|
|
|
+ /// Inode alloc failed.
|
|
|
+ EALLOCFAIL = 98,
|
|
|
}
|
|
|
|
|
|
/// error used in this crate
|