Re: [PATCH] asm-generic: add EMAXERRNO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



linux-arch-owner@xxxxxxxxxxxxxxx 写于 2009-06-15 21:30:09:

> Some architectures want to flag error returns from a syscall based on
> the return value. The range from zero to -511 is for errors that
> we can return to user space, so add a #define for this to
> include/asm-generic/errno.h.
> 
> Reported-by: Chen Liquin <liqin.chen@xxxxxxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
>  include/asm-generic/errno.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> On Monday 15 June 2009, liqin.chen@xxxxxxxxxxxxx wrote:
> 
> > Maybe I can don't use EMAXERRNO in score code. But I think define a 
> > maximum error number in asm-generic/errno.h is better.
> > 
> 
> How about this one?
> 
> diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h
> index e8852c0..16bb31d 100644
> --- a/include/asm-generic/errno.h
> +++ b/include/asm-generic/errno.h
> @@ -106,4 +106,8 @@
>  #define   EOWNERDEAD   130   /* Owner died */
>  #define   ENOTRECOVERABLE   131   /* State not recoverable */
> 
> +#ifdef __KERNEL__
> +#define   EMAXERRNO   511   /* maximum errno value we return to user */
> +#endif
> +
>  #endif
> -- 
OK, it is easy to use.
?韬{.n?????%??檩??w?{.n???{饼??Ф?塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux