Linux-man Archive on lore.kernel.org
 help / color / Atom feed
* syscall man page
@ 2020-05-29 22:16 Jonny Grant
  2020-06-08 21:02 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Jonny Grant @ 2020-05-29 22:16 UTC (permalink / raw)
  To: linux-man, Michael Kerrisk

Good evening

Quoting part of the syscall man page:

RETURN VALUE
        The  return value is defined by the system call being invoked.  In gen‐
        eral, a 0 return value indicates success.  A -1 return value  indicates
        an error, and an error code is stored in errno.


The last sentence doesn't quite sound right in English, and different from other man pages eg closedir. I would propose 
updating it to be :-

"On error, -1 is returned, and errno is set appropriately"

Cheers
Jonny

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: syscall man page
  2020-05-29 22:16 syscall man page Jonny Grant
@ 2020-06-08 21:02 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-06-08 21:02 UTC (permalink / raw)
  To: Jonny Grant, linux-man; +Cc: mtk.manpages

Hello Jonny,

On 5/30/20 12:16 AM, Jonny Grant wrote:
> Good evening
> 
> Quoting part of the syscall man page:
> 
> RETURN VALUE
>         The  return value is defined by the system call being invoked.  In gen‐
>         eral, a 0 return value indicates success.  A -1 return value  indicates
>         an error, and an error code is stored in errno.
> 
> 
> The last sentence doesn't quite sound right in English, and
> different from other man pages eg closedir. I would propose 
> updating it to be :-
> 
> "On error, -1 is returned, and errno is set appropriately"

The thing is, syscall() different from your average system call
or library function, so I think it's not unreasonable that the
wording is somewhat different. That said, I applied the patch 
below.

Cheers,

Michael

diff --git a/man2/syscall.2 b/man2/syscall.2
index 2fd94db53..382c40b22 100644
--- a/man2/syscall.2
+++ b/man2/syscall.2
@@ -82,9 +82,8 @@ when invoking a system call that has no wrapper function in the C library.
 .BR syscall ()
 saves CPU registers before making the system call,
 restores the registers upon return from the system call,
-and stores any error code returned by the system call in
-.BR errno (3)
-if an error occurs.
+and stores any error returned by the system call in
+.BR errno (3).
 .PP
 Symbolic constants for system call numbers can be found in the header file
 .IR <sys/syscall.h> .
@@ -92,7 +91,7 @@ Symbolic constants for system call numbers can be found in the header file
 The return value is defined by the system call being invoked.
 In general, a 0 return value indicates success.
 A \-1 return value indicates an error,
-and an error code is stored in
+and an error number is stored in
 .IR errno .
 .SH NOTES
 .BR syscall ()



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 22:16 syscall man page Jonny Grant
2020-06-08 21:02 ` Michael Kerrisk (man-pages)

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git