* [PATCH] errno.h: Improve ENOSYS's comment
@ 2014-08-22 16:30 Andy Lutomirski
2014-08-22 16:52 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2014-08-22 16:30 UTC (permalink / raw)
To: Michael Kerrisk (man-pages),
Andy Whitcroft, Joe Perches, Arnd Bergmann, Andrew Morton
Cc: linux-kernel, Andy Lutomirski
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 command in errno.h to help clarify ENOSYS's purpose.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
---
include/uapi/asm-generic/errno.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
index 1e1ea6e..b24a400 100644
--- a/include/uapi/asm-generic/errno.h
+++ b/include/uapi/asm-generic/errno.h
@@ -6,7 +6,7 @@
#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 */
+#define ENOSYS 38 /* Bad system call number */
#define ENOTEMPTY 39 /* Directory not empty */
#define ELOOP 40 /* Too many symbolic links encountered */
#define EWOULDBLOCK EAGAIN /* Operation would block */
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] errno.h: Improve ENOSYS's comment
2014-08-22 16:30 [PATCH] errno.h: Improve ENOSYS's comment Andy Lutomirski
@ 2014-08-22 16:52 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2014-08-22 16:52 UTC (permalink / raw)
To: Andy Lutomirski
Cc: Michael Kerrisk (man-pages),
Andy Whitcroft, Arnd Bergmann, Andrew Morton, linux-kernel
On Fri, 2014-08-22 at 09:30 -0700, Andy Lutomirski wrote:
> 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 command in errno.h to help clarify ENOSYS's purpose.
[]
> diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
[]
> @@ -6,7 +6,7 @@
[]
> -#define ENOSYS 38 /* Function not implemented */
> +#define ENOSYS 38 /* Bad system call number */
I suggest "Invalid" rather than "Bad".
Maybe also add something like:
/* see: man 2 syscalls */
or
/* grep for SYSCALL_DEFINE */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-22 16:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-22 16:30 [PATCH] errno.h: Improve ENOSYS's comment Andy Lutomirski
2014-08-22 16:52 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®