From fac7dabcd13b268a883873d57ecde18106c81b07 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 10 May 2021 19:55:48 +0200 Subject: [PATCH] reboot.2: Use syscall(SYS_...); for system calls without a wrapper Explain also why headers are needed. And some ffix. Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man2/reboot.2 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 " \ +"/* Definition of " LINUX_REBOOT_* " constants */" +.BR "#include " "/* Definition of " SYS_* " constants */" .B #include -.B #include .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 " "/* Definition of " RB_* " constants */" .B #include -.B #include .PP .BI "int reboot(int " cmd ); .fi