-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
What we have done
We added some code in error.rs to enable RROS kernel
See
Lines 103 to 184 in a39ff9d
| #[cfg(CONFIG_RROS)] | |
| pub const EINVAL: Self = Error(-(bindings::EINVAL as i32)); | |
| /// Out of memory. | |
| #[cfg(CONFIG_RROS)] | |
| pub const ENOMEM: Self = Error(-(bindings::ENOMEM as i32)); | |
| /// Bad address. | |
| #[cfg(CONFIG_RROS)] | |
| pub const EFAULT: Self = Error(-(bindings::EFAULT as i32)); | |
| /// Illegal seek. | |
| #[cfg(CONFIG_RROS)] | |
| pub const ESPIPE: Self = Error(-(bindings::ESPIPE as i32)); | |
| /// Try again. | |
| #[cfg(CONFIG_RROS)] | |
| pub const EAGAIN: Self = Error(-(bindings::EAGAIN as i32)); | |
| /// Device or resource busy. | |
| #[cfg(CONFIG_RROS)] | |
| pub const EBUSY: Self = Error(-(bindings::EBUSY as i32)); | |
| /// Restart the system call. | |
| #[cfg(CONFIG_RROS)] | |
| pub const ERESTARTSYS: Self = Error(-(bindings::ERESTARTSYS as i32)); | |
| /// Operation not permitted. | |
| #[cfg(CONFIG_RROS)] | |
| pub const EPERM: Self = Error(-(bindings::EPERM as i32)); | |
| /// No such process. | |
| #[cfg(CONFIG_RROS)] | |
| pub const ESRCH: Self = Error(-(bindings::ESRCH as i32)); | |
| /// No such file or directory. | |
| #[cfg(CONFIG_RROS)] | |
| pub const ENOENT: Self = Error(-(bindings::ENOENT as i32)); | |
| /// Interrupted system call. | |
| #[cfg(CONFIG_RROS)] | |
| pub const EINTR: Self = Error(-(bindings::EINTR as i32)); | |
| /// Bad file number. | |
| #[cfg(CONFIG_RROS)] | |
| pub const EBADF: Self = Error(-(bindings::EBADF as i32)); | |
| /// Resource deadlock would occur | |
| #[cfg(CONFIG_RROS)] | |
| pub const EDEADLK: Self = Error(-(bindings::EDEADLK as i32)); | |
| /// Connection timed out | |
| #[cfg(CONFIG_RROS)] | |
| pub const ETIMEDOUT: Self = Error(-(bindings::ETIMEDOUT as i32)); | |
| /// Owner died | |
| #[cfg(CONFIG_RROS)] | |
| pub const EOWNERDEAD: Self = Error(-(bindings::EOWNERDEAD as i32)); | |
| /// Identifier removed | |
| #[cfg(CONFIG_RROS)] | |
| pub const EIDRM: Self = Error(-(bindings::EIDRM as i32)); | |
| /// Stale file handle | |
| #[cfg(CONFIG_RROS)] | |
| pub const ESTALE: Self = Error(-(bindings::ESTALE as i32)); | |
| /// Not a typewriter | |
| #[cfg(CONFIG_RROS)] | |
| pub const ENOTTY: Self = Error(-(bindings::ENOTTY as i32)); | |
| /// No such device or address | |
| #[cfg(CONFIG_RROS)] | |
| pub const ENXIO: Self = Error(-(bindings::ENXIO as i32)); | |
| /// File exists | |
| #[cfg(CONFIG_RROS)] | |
| pub const EEXIST: Self = Error(-(bindings::EEXIST as i32)); | |
| /// Poll cycles | |
| #[cfg(CONFIG_RROS)] | |
| pub const ELOOP: Self = Error(-(bindings::ELOOP as i32)); |
Wat we should do next
Remove the above code I mentioned and use new Error wrapper in RROS kernel
See
Lines 35 to 87 in a39ff9d
| declare_err!(EPERM, "Operation not permitted."); | |
| declare_err!(ENOENT, "No such file or directory."); | |
| declare_err!(ESRCH, "No such process."); | |
| declare_err!(EINTR, "Interrupted system call."); | |
| declare_err!(EIO, "I/O error."); | |
| declare_err!(ENXIO, "No such device or address."); | |
| declare_err!(E2BIG, "Argument list too long."); | |
| declare_err!(ENOEXEC, "Exec format error."); | |
| declare_err!(EBADF, "Bad file number."); | |
| declare_err!(ECHILD, "No child processes."); | |
| declare_err!(EAGAIN, "Try again."); | |
| declare_err!(ENOMEM, "Out of memory."); | |
| declare_err!(EACCES, "Permission denied."); | |
| declare_err!(EFAULT, "Bad address."); | |
| declare_err!(ENOTBLK, "Block device required."); | |
| declare_err!(EBUSY, "Device or resource busy."); | |
| declare_err!(EEXIST, "File exists."); | |
| declare_err!(EXDEV, "Cross-device link."); | |
| declare_err!(ENODEV, "No such device."); | |
| declare_err!(ENOTDIR, "Not a directory."); | |
| declare_err!(EISDIR, "Is a directory."); | |
| declare_err!(EINVAL, "Invalid argument."); | |
| declare_err!(ENFILE, "File table overflow."); | |
| declare_err!(EMFILE, "Too many open files."); | |
| declare_err!(ENOTTY, "Not a typewriter."); | |
| declare_err!(ETXTBSY, "Text file busy."); | |
| declare_err!(EFBIG, "File too large."); | |
| declare_err!(ENOSPC, "No space left on device."); | |
| declare_err!(ESPIPE, "Illegal seek."); | |
| declare_err!(EROFS, "Read-only file system."); | |
| declare_err!(EMLINK, "Too many links."); | |
| declare_err!(EPIPE, "Broken pipe."); | |
| declare_err!(EDOM, "Math argument out of domain of func."); | |
| declare_err!(ERANGE, "Math result not representable."); | |
| declare_err!(ERESTARTSYS, "Restart the system call."); | |
| declare_err!(ERESTARTNOINTR, "System call was interrupted by a signal and will be restarted."); | |
| declare_err!(ERESTARTNOHAND, "Restart if no handler."); | |
| declare_err!(ENOIOCTLCMD, "No ioctl command."); | |
| declare_err!(ERESTART_RESTARTBLOCK, "Restart by calling sys_restart_syscall."); | |
| declare_err!(EPROBE_DEFER, "Driver requests probe retry."); | |
| declare_err!(EOPENSTALE, "Open found a stale dentry."); | |
| declare_err!(ENOPARAM, "Parameter not supported."); | |
| declare_err!(EBADHANDLE, "Illegal NFS file handle."); | |
| declare_err!(ENOTSYNC, "Update synchronization mismatch."); | |
| declare_err!(EBADCOOKIE, "Cookie is stale."); | |
| declare_err!(ENOTSUPP, "Operation is not supported."); | |
| declare_err!(ETOOSMALL, "Buffer or request is too small."); | |
| declare_err!(ESERVERFAULT, "An untranslatable error occurred."); | |
| declare_err!(EBADTYPE, "Type not supported by server."); | |
| declare_err!(EJUKEBOX, "Request initiated, but will not complete before timeout."); | |
| declare_err!(EIOCBQUEUED, "iocb queued, will get completion event."); | |
| declare_err!(ERECALLCONFLICT, "Conflict with recalled state."); | |
| declare_err!(ENOGRACE, "NFS file lock reclaim refused."); |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels