.\" Modified 1998-09-08 by aeb
.\" Modified 2004-06-17 by Michael Kerrisk <mtk-manpages@gmx.net>
.\" Modified 2004-10-10 by aeb
+.\" 2004-12-14 mtk, Anand Kumria: added new errors
.\"
.TH SWAPON 2 2004-10-10 "Linux 2.6.7" "Linux Programmer's Manual"
.SH NAME
.br
.BI "int swapoff(const char *" path );
.SH DESCRIPTION
-.B swapon
+.BR swapon ()
sets the swap area to the file or block device specified by
.IR path .
-.B swapoff
+.BR swapoff ()
stops swapping to the file or block device specified by
.IR path .
.PP
-.B swapon
+.BR swapon ()
takes a
.I swapflags
argument.
has the
.I SWAP_FLAG_PREFER
bit turned on, the new swap area will have a higher priority than default.
-The priority is encoded as:
+The priority is encoded within
+.I swapflags
+as:
.br
.sp
.I " (prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK"
.SH ERRORS
.TP
.B EBUSY
+.RB (for swapon ())
The specified
.I path
is already being used as a swap area.
The file
.I path
exists, but refers neither to a regular file nor to a block device;
-or, the indicated path does not contain a valid swap signature.
+or, for
+.BR swapon (),
+the indicated path does not contain a valid swap signature;
+or, for
+.BR swapoff (),
+.I path
+is not currently a swap area.
.TP
.B ENFILE
The system limit on the total number of open files has been reached.
.SH "CONFORMING TO"
These functions are Linux specific and should not be used in programs
intended to be portable.
-The second `swapflags' argument was introduced in Linux 1.3.2.
+The second
+.I swapflags
+argument was introduced in Linux 1.3.2.
.SH NOTES
The partition or path must be prepared with
.BR mkswap (8).