NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO | BUGS
#include <unistd.h>int swapon(const char *special);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
FS_MAPPER
The swapon() system call makes the block device special available to the system for allocation for 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 occurs, a value of -1 is returned and errno is set to indicate one of the following error conditions.
A component of the path prefix is not a directory.
A component of a pathname exceeded 255 characters, or an entire pathname exceeded 1023 characters.
The named device does not exist.
Search permission is denied for a component of the path prefix.
The caller is not the super-user.
special is not a block device.
The device specified by special has already been made available for swapping.
The device configured by special was not configured into the system as a swap device.
The major device number of special is out of range (this indicates no device driver exists for the associated hardware).
An I/O error occurred while opening the swap device.
special points outside the process's allocated address space.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
It is not possible to stop swapping on a disk in order to dismount the pack.
This call will be upgraded in future versions of the BSD system.
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO | BUGS