pub enum KernelError {
Show 21 variants
OperationNotPermitted,
NoSuchEntry,
IOError,
NoExec,
BadFileDescriptor,
NoMemory,
InvalidAccess,
BadAddress,
Busy,
FileExist,
NotDirectory,
IsDirectory,
InvalidArgument,
TooManyOpenFile,
NoSpace,
BrokenPipe,
NameTooLong,
NoSuchSyscall,
DirectoryNotEmpty,
FilesystemCorrupted(&'static str),
NotSupportedOperation,
}Expand description
Enum representing errors that can occur during a kernel operation.
This enum is used to categorize errors encountered by the kernel operation. Each variant corresponds to a specific type of error that might occur during the handling of a kernel operation. These errors can be returned to the user program to indicate the nature of the failure.
Variants§
OperationNotPermitted
Operation is not permitted. (EPERM)
NoSuchEntry
No such file or directory. (ENOENT)
IOError
IO Error. (EIO)
NoExec
Exec format error. (ENOEXEC)
BadFileDescriptor
BAD file descriptor. (EBADF)
NoMemory
Out of memory. (ENOMEM)
InvalidAccess
Permission denied. (EACCES)
BadAddress
Bad address. (EFAULT)
Busy
Device or resource busy. (EBUSY)
FileExist
File exists. (EEXIST)
NotDirectory
Not a directory. (ENOTDIR)
IsDirectory
Is a directory. (EISDIR)
InvalidArgument
Invalid arguement. (EINVAL)
TooManyOpenFile
Too many open files. (EMFILE)
NoSpace
No space left on device. (ENOSPC)
BrokenPipe
Broken pipe. (EPIPE)
NameTooLong
File name too long. (ENAMETOOLONG)
NoSuchSyscall
Invalid system call number. (ENOSYS)
DirectoryNotEmpty
Directory not empty (ENOTEMPTY)
FilesystemCorrupted(&'static str)
File system is corrupted. (EFSCORRUPTED)
NotSupportedOperation
Operation is not supported. (ENOTSUPP)
Implementations§
Source§impl KernelError
impl KernelError
Sourcepub fn into_usize(self) -> usize
pub fn into_usize(self) -> usize
Converts the KernelError enum into a corresponding usize error
code. The result is cast to usize for use as a return value in
system calls.