lkml.org 
[lkml]   [2023]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] rust: error: add missing error codes
From
On Mon, 8 May 2023 12:47:01 +0100
Gary Guo <gary@garyguo.net> wrote:
> On Thu, 4 May 2023 06:48:54 +0000
> Alice Ryhl <aliceryhl@google.com> 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
./arch/powerpc/include/uapi/asm/errno.h
./arch/mips/include/asm/errno.h
./arch/mips/include/uapi/asm/errno.h
./arch/alpha/include/uapi/asm/errno.h
./arch/parisc/include/uapi/asm/errno.h
./arch/sparc/include/uapi/asm/errno.h
./arch/x86/include/generated/uapi/asm/errno.h
./tools/arch/powerpc/include/uapi/asm/errno.h
./tools/arch/mips/include/asm/errno.h
./tools/arch/mips/include/uapi/asm/errno.h
./tools/arch/alpha/include/uapi/asm/errno.h
./tools/arch/parisc/include/uapi/asm/errno.h
./tools/arch/sparc/include/uapi/asm/errno.h
./tools/arch/x86/include/uapi/asm/errno.h
./tools/include/nolibc/errno.h
./tools/include/uapi/asm/errno.h
./tools/include/uapi/asm-generic/errno.h
./include/uapi/asm-generic/errno.h
./include/uapi/linux/errno.h
./include/linux/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.

\
 
 \ /
  Last update: 2023-05-09 10:08    [W:0.367 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site