OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man2 / swapon.2
index 19bbe19..e4c67d2 100644 (file)
 .\" 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 );
@@ -123,11 +121,19 @@ 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, 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
@@ -192,3 +198,12 @@ is called, even if that flag bit is not set.
 .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/.