Formatting fixes plus additional material in ERRORS

This commit is contained in:
Michael Kerrisk 2004-12-15 13:37:09 +00:00
parent e28334cee7
commit 526f4e1ffe
1 changed files with 18 additions and 6 deletions

View File

@ -30,6 +30,7 @@
.\" 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
@ -45,14 +46,14 @@ swapon, swapoff \- start/stop swapping to file/device
.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.
@ -61,7 +62,9 @@ If
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"
@ -99,6 +102,7 @@ is set appropriately.
.SH ERRORS
.TP
.B EBUSY
.RB (for swapon ())
The specified
.I path
is already being used as a swap area.
@ -107,7 +111,13 @@ 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.
@ -129,7 +139,9 @@ capability, or all
.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).