summaryrefslogtreecommitdiffstats
path: root/man2/pivot_root.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/pivot_root.2')
-rw-r--r--man2/pivot_root.236
1 files changed, 18 insertions, 18 deletions
diff --git a/man2/pivot_root.2 b/man2/pivot_root.2
index 832637dc5..55328b7db 100644
--- a/man2/pivot_root.2
+++ b/man2/pivot_root.2
@@ -23,7 +23,7 @@ Standard C library
glibc provides no wrapper for
.BR pivot_root (),
necessitating the use of
-.BR syscall (2).
+.MR syscall 2 .
.SH DESCRIPTION
.BR pivot_root ()
changes the root mount in the mount namespace of the calling process.
@@ -90,7 +90,7 @@ On error, \-1 is returned, and
.SH ERRORS
.BR pivot_root ()
may fail with any of the same errors as
-.BR stat (2).
+.MR stat 2 .
Additionally, it may fail with the following errors:
.TP
.B EBUSY
@@ -127,7 +127,7 @@ is not a mount point.
.B EINVAL
The current root directory is not a mount point
(because of an earlier
-.BR chroot (2)).
+.MR chroot 2 ).
.TP
.B EINVAL
The current root is on the rootfs (initial ramfs) mount; see NOTES.
@@ -157,7 +157,7 @@ Linux.
Linux 2.3.41.
.SH NOTES
A command-line interface for this system call is provided by
-.BR pivot_root (8).
+.MR pivot_root 8 .
.P
.BR pivot_root ()
allows the caller to switch to a new root filesystem while at the same time
@@ -173,7 +173,7 @@ One use of
.BR pivot_root ()
is during system startup, when the
system mounts a temporary root filesystem (e.g., an
-.BR initrd (4)),
+.MR initrd 4 ),
then mounts the real root filesystem, and eventually turns the latter into
the root directory of all relevant processes and threads.
A modern use is to set up a root filesystem during
@@ -196,9 +196,9 @@ to delete everything in rootfs, overmount rootfs with the new root, attach
to the new
.IR /dev/console ,
and exec the new
-.BR init (1).
+.MR init 1 .
Helper programs for this process exist; see
-.BR switch_root (8).
+.MR switch_root 8 .
.\"
.SS pivot_root(\[dq].\[dq], \[dq].\[dq])
.I new_root
@@ -264,15 +264,15 @@ was first implemented and will not change now.
The program below demonstrates the use of
.BR pivot_root ()
inside a mount namespace that is created using
-.BR clone (2).
+.MR clone 2 .
After pivoting to the root directory named in the program's
first command-line argument, the child created by
-.BR clone (2)
+.MR clone 2
then executes the program named in the remaining command-line arguments.
.P
We demonstrate the program by creating a directory that will serve as
the new root filesystem and placing a copy of the (statically linked)
-.BR busybox (1)
+.MR busybox 1
executable in that directory.
.P
.in +4n
@@ -399,11 +399,11 @@ main(int argc, char *argv[])
.EE
.\" SRC END
.SH SEE ALSO
-.BR chdir (2),
-.BR chroot (2),
-.BR mount (2),
-.BR stat (2),
-.BR initrd (4),
-.BR mount_namespaces (7),
-.BR pivot_root (8),
-.BR switch_root (8)
+.MR chdir 2 ,
+.MR chroot 2 ,
+.MR mount 2 ,
+.MR stat 2 ,
+.MR initrd 4 ,
+.MR mount_namespaces 7 ,
+.MR pivot_root 8 ,
+.MR switch_root 8