| SWAPON(3) | Library Functions Manual | SWAPON(3) |
swapon — add a
swap device for interleaved paging/swapping
#include
<unistd.h>
int
swapon(const
char *special);
swapon()
makes the block device special available to the system
for allocation for paging and swapping. The names of potentially available
devices are known to the system and defined at system configuration time.
The size of the swap area on special is calculated at
the time the device is first made available for swapping.
If an error has occurred, a value of -1 is returned and errno is set to indicate the error.
swapon() succeeds unless:
ENOTDIR]ENAMETOOLONG]NAME_MAX}
characters, or an entire path name exceeded
{PATH_MAX} characters.ENOENT]EACCES]ELOOP]EPERM]ENOTBLK]EBUSY]EINVAL]ENXIO]EIO]EFAULT]The swapon() function call appeared in
4.0BSD and was removed NetBSD
1.3
This call will be upgraded in future versions of the system.
| June 4, 1993 | NetBSD 11.0 |