History

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.

Andy Lutomirski committed 11 years ago

Commit e15f4311 parent 91c9afa1 file · +10 −1Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/asm-generic/errno.h+10−1
@@ -6,7 +6,16 @@ · 5 unmodified lines
6#define EDEADLK 35 /* Resource deadlock would occur */6#define EDEADLK 35 /* Resource deadlock would occur */
7#define ENAMETOOLONG 36 /* File name too long */7#define ENAMETOOLONG 36 /* File name too long */
8#define ENOLCK 37 /* No record locks available */8#define ENOLCK 37 /* No record locks available */
9#define ENOSYS 38 /* Function not implemented */9
10/*
11 * This error code is special: arch syscall entry code will return
12 * -ENOSYS if users try to call a syscall that doesn't exist. To keep
13 * failures of syscalls that really do exist distinguishable from
14 * failures due to attempts to use a nonexistent syscall, syscall
15 * implementations should refrain from returning -ENOSYS.
16 */
17#define ENOSYS 38 /* Invalid system call number */
18
10#define ENOTEMPTY 39 /* Directory not empty */19#define ENOTEMPTY 39 /* Directory not empty */
11#define ELOOP 40 /* Too many symbolic links encountered */20#define ELOOP 40 /* Too many symbolic links encountered */
12#define EWOULDBLOCK EAGAIN /* Operation would block */21#define EWOULDBLOCK EAGAIN /* Operation would block */