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

From: Alice Ryhl
Date: Tue May 09 2023 - 04:08:02 EST

On Mon, 8 May 2023 12:47:01 +0100
Gary Guo <gary@xxxxxxxxxxx> wrote:
> On Thu, 4 May 2023 06:48:54 +0000
> 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`.
> `include/linux/errno.h` also includes all of `asm/errno.h`,
> which defines EDEADLK - EHWPOISON, which is not included in this patch.
> I feel like these error codes should be added first?

It seems like there are a lot of asm/errno.h files:

$ find . -name errno.h

How should I proceed with this? You mention EDEADLK - EHWPOISON, but its
not clear to me which asm/errno.h file I should base this on.