diff options
author | Andy Lutomirski | 2015-04-16 21:44:47 +0200 |
---|---|---|
committer | Linus Torvalds | 2015-04-17 15:03:58 +0200 |
commit | e15f431fe2d53cd4673510736da7d4fa1090e096 (patch) | |
tree | c825e36dd160760cda8093e4ef384583a279dcb8 /include/uapi | |
parent | checkpatch.pl: new instances of ENOSYS are errors (diff) | |
download | kernel-qcow2-linux-e15f431fe2d53cd4673510736da7d4fa1090e096.tar.gz kernel-qcow2-linux-e15f431fe2d53cd4673510736da7d4fa1090e096.tar.xz kernel-qcow2-linux-e15f431fe2d53cd4673510736da7d4fa1090e096.zip |
errno.h: Improve ENOSYS's comment
ENOSYS is the mechanism used by user code to detect whether the running
kernel implements a given system call. It should not be returned by
anything except an unimplemented system call.
Unfortunately, it is rather frequently used in the kernel to indicate that
various new functions of existing system calls are not implemented. This
should be discouraged.
Improve the comment in errno.h to help clarify ENOSYS's purpose.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/asm-generic/errno.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h index 1e1ea6e6e7a5..88e0914cf2d9 100644 --- a/include/uapi/asm-generic/errno.h +++ b/include/uapi/asm-generic/errno.h @@ -6,7 +6,16 @@ #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ -#define ENOSYS 38 /* Function not implemented */ + +/* + * This error code is special: arch syscall entry code will return + * -ENOSYS if users try to call a syscall that doesn't exist. To keep + * failures of syscalls that really do exist distinguishable from + * failures due to attempts to use a nonexistent syscall, syscall + * implementations should refrain from returning -ENOSYS. + */ +#define ENOSYS 38 /* Invalid system call number */ + #define ENOTEMPTY 39 /* Directory not empty */ #define ELOOP 40 /* Too many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would block */ |