]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
kexec_load.2: Use syscall(SYS_...); for system calls without a wrapper
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 10 May 2021 17:55:22 +0000 (19:55 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 11 May 2021 05:18:08 +0000 (17:18 +1200)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/kexec_load.2

index 62a3e2006ac8d22ef033c7bbf6c12230d80370ec..74f14235581bc1dad909ce8dea5e692acfcc02f8 100644 (file)
 kexec_load, kexec_file_load \- load a new kernel for later execution
 .SH SYNOPSIS
 .nf
-.B #include <linux/kexec.h>
+.BR "#include <linux/kexec.h>" "      /* Definition of " KEXEC_* " constants */"
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "long kexec_load(unsigned long " entry ", unsigned long " nr_segments ,
-.BI "                struct kexec_segment *" segments ,
-.BI "                unsigned long " flags );
-.BI "long kexec_file_load(int " kernel_fd ", int " initrd_fd ,
-.BI "                unsigned long " cmdline_len ", const char *" cmdline ,
-.BI "                unsigned long " flags );
+.BI "long syscall(SYS_kexec_load, unsigned long " entry ,
+.BI "             unsigned long " nr_segments \
+", struct kexec_segment *" segments ,
+.BI "             unsigned long " flags );
+.BI "long syscall(SYS_kexec_file_load, int " kernel_fd ", int " initrd_fd ,
+.BI "             unsigned long " cmdline_len ", const char *" cmdline ,
+.BI "             unsigned long " flags );
 .fi
 .PP
 .IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+glibc provides no wrappers for these system calls,
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 The
 .BR kexec_load ()
@@ -332,9 +337,6 @@ The
 system call first appeared in Linux 3.17.
 .SH CONFORMING TO
 These system calls are Linux-specific.
-.SH NOTES
-Glibc does not provide a wrapper for these system calls; call them using
-.BR syscall (2).
 .SH SEE ALSO
 .BR reboot (2),
 .BR syscall (2),