mirror of https://github.com/mkerrisk/man-pages
pivot_root.2: Use syscall(SYS_...); for system calls without a wrapper
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
5a24cb274f
commit
3e67d1a76b
|
@ -29,11 +29,18 @@
|
||||||
pivot_root \- change the root mount
|
pivot_root \- change the root mount
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.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
|
.fi
|
||||||
.PP
|
.PP
|
||||||
.IR Note :
|
.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
|
.SH DESCRIPTION
|
||||||
.BR pivot_root ()
|
.BR pivot_root ()
|
||||||
changes the root mount in the mount namespace of the calling process.
|
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 ()
|
.BR pivot_root ()
|
||||||
is Linux-specific and hence is not portable.
|
is Linux-specific and hence is not portable.
|
||||||
.SH NOTES
|
.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
|
A command-line interface for this system call is provided by
|
||||||
.BR pivot_root (8).
|
.BR pivot_root (8).
|
||||||
.PP
|
.PP
|
||||||
|
|
Loading…
Reference in New Issue