.\" 2007-06-22 Ivana Varekova <varekova@redhat.com>, mtk
.\" Update text describing limit on number of swap files.
.\"
-.TH SWAPON 2 2010-11-15 "Linux" "Linux Programmer's Manual"
+.TH SWAPON 2 2014-05-28 "Linux" "Linux Programmer's Manual"
.SH NAME
swapon, swapoff \- start/stop swapping to file/device
.SH SYNOPSIS
.B #include <unistd.h>
.br
-.B #include <asm/page.h> /* to find PAGE_SIZE */
-.br
.B #include <sys/swap.h>
.sp
.BI "int swapon(const char *" path ", int " swapflags );
The file
.I path
exists, but refers neither to a regular file nor to a block device;
-or, for
-.BR swapon (),
-the indicated path does not contain a valid swap signature or
-resides on an in-memory filesystem like tmpfs; or, for
-.BR swapoff (),
+.TP
+.B EINVAL
+.RB ( swapon ())
+The indicated path does not contain a valid swap signature or
+resides on an in-memory filesystem such as tmpfs.
+.TP
+.BR EINVAL " (since Linux 3.4)"
+.RB ( swapon ())
+An invalid flag value was specified in
+.IR flags .
+.TP
+.B EINVAL
+.RB ( swapoff ())
.I path
is not currently a swap area.
.TP
.BR mkswap (8),
.BR swapoff (8),
.BR swapon (8)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.