Re: [PATCH v2] rust: error: add missing error codes

From: Miguel Ojeda
Date: Wed May 31 2023 - 13:11:51 EST


On Thu, May 4, 2023 at 8:49 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>

Applied to `rust-next` -- thanks everyone!

Cheers,
Miguel