summaryrefslogtreecommitdiff
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2023-05-04 06:48:54 +0000
committerMiguel Ojeda <ojeda@kernel.org>2023-05-31 18:53:10 +0200
commite37b654c379e514357ccadb22c6291d3471fa5e5 (patch)
treef24d90d8c3bacad9001807aaf0d54a72d038fec8 /rust/helpers.c
parent66bd7533ef19bf8a3515ce702013aba368f58df3 (diff)
rust: error: add missing error codes
This adds the error codes from `include/linux/errno.h` to the list of Rust error constants. These errors were not included originally, because they are not supposed to be visible from userspace. However, they are still a perfectly valid error to use when writing a kernel driver. For example, you might want to return ERESTARTSYS if you receive a signal during a call to `schedule`. This patch inserts an annotation to skip rustfmt on the list of error codes. Without it, three of the error codes are split over several lines, which looks terribly inconsistent. Signed-off-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Link: https://lore.kernel.org/r/20230504064854.774820-1-aliceryhl@google.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions