diff mbox series

[39/39] reboot.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210510175546.28445-40-alx.manpages@gmail.com
State New
Headers show
Series man2: SYNOPSIS: Fix headers, use syscall(), and other fixes | expand

Commit Message

Alejandro Colomar \(man-pages\) May 10, 2021, 5:55 p.m. UTC
Explain also why are headers needed.
And some ffix.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/reboot.2 | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Comments

Alejandro Colomar \(man-pages\) May 10, 2021, 6:02 p.m. UTC | #1
On 5/10/21 7:55 PM, Alejandro Colomar wrote:
> Explain also why are headers needed.

s/are headers/headers are/

> And some ffix.
> 
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Michael Kerrisk \(man-pages\) May 11, 2021, 5:19 a.m. UTC | #2
On 5/11/21 6:02 AM, Alejandro Colomar (man-pages) wrote:
> On 5/10/21 7:55 PM, Alejandro Colomar wrote:
>> Explain also why are headers needed.
> 
> s/are headers/headers are/

Done.
diff mbox series

Patch

diff --git a/man2/reboot.2 b/man2/reboot.2
index 8a9da5904..74e8f5caa 100644
--- a/man2/reboot.2
+++ b/man2/reboot.2
@@ -30,21 +30,23 @@ 
 reboot \- reboot or enable/disable Ctrl-Alt-Del
 .SH SYNOPSIS
 .nf
-/* Since kernel version 2.1.30 there are symbolic names LINUX_REBOOT_*
+.RB "/* Since kernel version 2.1.30 there are symbolic names " LINUX_REBOOT_*
    for the constants and a fourth argument to the call: */
 .PP
+.BR "#include <linux/reboot.h>  " \
+"/* Definition of " LINUX_REBOOT_* " constants */"
+.BR "#include <sys/syscall.h>   " "/* Definition of " SYS_* " constants */"
 .B #include <unistd.h>
-.B #include <linux/reboot.h>
 .PP
-.BI "int reboot(int " magic ", int " magic2 ", int " cmd ", void *" arg );
+.BI "int syscall(SYS_reboot, int " magic ", int " magic2 ", int " cmd ", void *" arg );
 .PP
 /* Under glibc and most alternative libc's (including uclibc, dietlibc,
    musl and a few others), some of the constants involved have gotten
-   symbolic names RB_*, and the library call is a 1-argument
+.RB "   symbolic names " RB_* ", and the library call is a 1-argument"
    wrapper around the system call: */
 .PP
+.BR "#include <sys/reboot.h>    " "/* Definition of " RB_* " constants */"
 .B #include <unistd.h>
-.B #include <sys/reboot.h>
 .PP
 .BI "int reboot(int " cmd );
 .fi