Messages in this thread Patch in this message | | | Date | Wed, 3 May 2023 08:39:41 +0000 | Subject | [PATCH v1] rust: error: add ERESTARTSYS error code | From | Alice Ryhl <> |
| |
This error code was probably excluded here originally because it never actually reaches user programs when a syscall returns it. However, from the perspective of a kernel driver, it is still a perfectly valid error type, that the driver might need to return. E.g., this can be necessary when a signal occurs during sleep.
Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- rust/kernel/error.rs | 1 + 1 file changed, 1 insertion(+)
diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs index 5f4114b30b94..cbde1b2d29f4 100644 --- a/rust/kernel/error.rs +++ b/rust/kernel/error.rs @@ -58,6 +58,7 @@ pub mod code { 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."); } /// Generic integer kernel error. base-commit: ea76e08f4d901a450619831a255e9e0a4c0ed162 -- 2.40.1.495.gc816e09b53d-goog
| |