]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/swapon.2
ipc.5: Remove old link to svipc.7/sysvipc.7 page
[thirdparty/man-pages.git] / man2 / swapon.2
index 829a4c7c99cf43df6622ab59da33739d08c57281..7b29947a82aa80420fb0d1ac6ff0c4f7cef9fc48 100644 (file)
 .\" 2007-06-22 Ivana Varekova <varekova@redhat.com>, mtk
 .\"     Update text describing limit on number of swap files.
 .\"
-.TH SWAPON 2 2014-05-28 "Linux" "Linux Programmer's Manual"
+.\" FIXME Linux 3.11 added SWAP_FLAG_DISCARD_ONCE and SWAP_FLAG_DISCARD_PAGES
+.\"    commit dcf6b7ddd7df8965727746f89c59229b23180e5a
+.\"    Author: Rafael Aquini <aquini@redhat.com>
+.\"    Date:   Wed Jul 3 15:02:46 2013 -0700
+.\"
+.TH SWAPON 2 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 swapon, swapoff \- start/stop swapping to file/device
 .SH SYNOPSIS
 .B #include <unistd.h>
 .br
 .B #include <sys/swap.h>
-.sp
+.PP
 .BI "int swapon(const char *" path ", int " swapflags );
 .br
 .BI "int swapoff(const char *" path );
@@ -62,10 +67,12 @@ argument, the new swap area will have a higher priority than default.
 The priority is encoded within
 .I swapflags
 as:
-.br
-.sp
-.I "    (prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK"
-.br
+.PP
+.in +4n
+.EX
+.I "(prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK"
+.EE
+.in
 .PP
 If the
 .B SWAP_FLAG_DISCARD
@@ -125,7 +132,8 @@ exists, but refers neither to a regular file nor to a block device;
 .B EINVAL
 .RB ( swapon ())
 The indicated path does not contain a valid swap signature or
-resides on an in-memory filesystem such as tmpfs.
+resides on an in-memory filesystem such as
+.BR tmpfs (5).
 .TP
 .BR EINVAL " (since Linux 3.4)"
 .RB ( swapon ())
@@ -138,7 +146,7 @@ An invalid flag value was specified in
 is not currently a swap area.
 .TP
 .B ENFILE
-The system limit on the total number of open files has been reached.
+The system-wide limit on the total number of open files has been reached.
 .TP
 .B ENOENT
 The file
@@ -163,7 +171,7 @@ argument was introduced in Linux 1.3.2.
 .SH NOTES
 The partition or path must be prepared with
 .BR mkswap (8).
-
+.PP
 There is an upper limit on the number of swap files that may be used,
 defined by the kernel constant
 .BR MAX_SWAPFILES .
@@ -183,7 +191,7 @@ Since kernel 2.6.32, the limit is further decreased by 1
 if the kernel is built with the
 .B CONFIG_MEMORY_FAILURE
 option.
-
+.PP
 Discard of swap pages was introduced in kernel 2.6.29,
 then made conditional
 on the