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

index e0c34c450f183999c356791124261cb5d42886bb..c301c2e4a9afad8774ee4d2eabf9f17479261b51 100644 (file)
 pivot_root \- change the root mount
 .SH SYNOPSIS
 .nf
-.BI "int pivot_root(const char *" new_root ", const char *" put_old );
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_pivot_root, const char *" new_root \
+", const char *" put_old );
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR pivot_root (),
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 .BR pivot_root ()
 changes the root mount in the mount namespace of the calling process.
@@ -168,9 +175,6 @@ was introduced in Linux 2.3.41.
 .BR pivot_root ()
 is Linux-specific and hence is not portable.
 .SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
-.PP
 A command-line interface for this system call is provided by
 .BR pivot_root (8).
 .PP