Commit | Line | Data |
---|---|---|
88b3ccf2 KB |
1 | .\" Copyright (c) 1980 The Regents of the University of California. |
2 | .\" All rights reserved. | |
1f431a5b | 3 | .\" |
91cff1e1 | 4 | .\" %sccs.include.redist.man% |
88b3ccf2 | 5 | .\" |
91cff1e1 | 6 | .\" @(#)swapon.2 6.6 (Berkeley) %G% |
1f431a5b | 7 | .\" |
2b75c396 | 8 | .TH SWAPON 2 "" |
1f431a5b KM |
9 | .UC 4 |
10 | .SH NAME | |
e06acb0b | 11 | swapon \- add a swap device for interleaved paging/swapping |
1f431a5b KM |
12 | .SH SYNOPSIS |
13 | .nf | |
e06acb0b KM |
14 | .B swapon(special) |
15 | .B char *special; | |
1f431a5b KM |
16 | .fi |
17 | .SH DESCRIPTION | |
e06acb0b KM |
18 | .I Swapon |
19 | makes the block device | |
20 | .I special | |
21 | available to the system for | |
22 | allocation for paging and swapping. The names of potentially | |
23 | available devices are known to the system and defined at system | |
24 | configuration time. The size of the swap area on | |
25 | .I special | |
26 | is calculated at the time the device is first made available | |
27 | for swapping. | |
0148896a DS |
28 | .SH "RETURN VALUE |
29 | If an error has occurred, a value of \-1 is returned and | |
30 | .I errno | |
31 | is set to indicate the error. | |
b5984ffe KM |
32 | .SH ERRORS |
33 | .I Swapon | |
34 | succeeds unless: | |
35 | .TP 15 | |
36 | [ENOTDIR] | |
37 | A component of the path prefix is not a directory. | |
38 | .TP 15 | |
39 | [EINVAL] | |
40 | The pathname contains a character with the high-order bit set. | |
41 | .TP 15 | |
42 | [ENAMETOOLONG] | |
43 | A component of a pathname exceeded 255 characters, | |
44 | or an entire path name exceeded 1023 characters. | |
45 | .TP 15 | |
46 | [ENOENT] | |
47 | The named device does not exist. | |
48 | .TP 15 | |
49 | [EACCES] | |
50 | Search permission is denied for a component of the path prefix. | |
51 | .TP 15 | |
52 | [ELOOP] | |
53 | Too many symbolic links were encountered in translating the pathname. | |
54 | .TP 15 | |
55 | [EPERM] | |
56 | The caller is not the super-user. | |
fd690c8b KM |
57 | .TP 15 |
58 | [ENOTBLK] | |
59 | .I Special | |
60 | is not a block device. | |
61 | .TP 15 | |
62 | [EBUSY] | |
63 | The device specified by \fIspecial\fP has already | |
64 | been made available for swapping | |
65 | .TP 15 | |
66 | [EINVAL] | |
67 | The device configured by \fIspecial\fP was not | |
68 | configured into the system as a swap device. | |
69 | .TP 15 | |
70 | [ENXIO] | |
71 | The major device number of | |
72 | .I special | |
73 | is out of range (this indicates no device driver exists | |
74 | for the associated hardware). | |
75 | .TP 15 | |
76 | [EIO] | |
77 | An I/O error occurred while opening the swap device. | |
78 | .TP 15 | |
79 | [EFAULT] | |
80 | .I Special | |
81 | points outside the process's allocated address space. | |
1f431a5b | 82 | .SH "SEE ALSO" |
e06acb0b | 83 | swapon(8), config(8) |
1f431a5b KM |
84 | .SH BUGS |
85 | There is no way to stop swapping on a disk so that the pack may be | |
86 | dismounted. | |
87 | .PP | |
e06acb0b | 88 | This call will be upgraded in future versions of the system. |