All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: liqin.chen@sunplusct.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org
Subject: [PATCH] asm-generic: add EMAXERRNO
Date: Mon, 15 Jun 2009 15:30:09 +0200	[thread overview]
Message-ID: <200906151530.10299.arnd@arndb.de> (raw)
In-Reply-To: <OF48364F7F.ED6F93C7-ON482575D6.0042A7E0-482575D6.0043654D@sunplusct.com>

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@sunplusct.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/asm-generic/errno.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

On Monday 15 June 2009, liqin.chen@sunplusct.com 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
-- 
1.6.3.1

 


  reply	other threads:[~2009-06-15 13:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09  6:26 [PATCH 07/27] score: create head files elf.h emergency-restart.h errno.h liqin.chen
2009-06-09  6:26 ` liqin.chen
2009-06-09 17:20 ` Arnd Bergmann
2009-06-13  6:39   ` liqin.chen
2009-06-13  6:39     ` liqin.chen
2009-06-13 22:23     ` Arnd Bergmann
2009-06-15 12:11       ` liqin.chen
2009-06-15 12:11         ` liqin.chen
2009-06-15 13:30         ` Arnd Bergmann [this message]
2009-06-15 13:31           ` [PATCH] asm-generic: add EMAXERRNO Matthew Wilcox
2009-06-15 14:02             ` Arnd Bergmann
2009-06-16  3:04               ` liqin.chen
2009-06-16  3:04                 ` liqin.chen
2009-06-16 14:13                 ` Arnd Bergmann
2009-06-15 13:33           ` liqin.chen
2009-06-15 13:33             ` liqin.chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906151530.10299.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liqin.chen@sunplusct.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.