Activates paging or swapping to a designated block device.
Standard C Library (libc.a)
#include <sys/vminfo.h>
int swapon ( PathName)
char *PathName;
The swapon subroutine makes the designated block device available to the system for allocation for paging and swapping.
The specified block device must be a logical volume on a disk device. The paging space size is determined from the current size of the logical volume.
Item | Description |
---|---|
PathName | Specifies the full path name of the block device. |
If an error occurs, the errno global variable is set to indicate the error:
Item | Description |
---|---|
EINTR | Signal was received during processing of a request. |
EINVAL | Invalid argument (size of device is invalid). |
ENOENT | The PathName file does not exist. |
ENOMEM | The maximum number of paging space devices (16) are already defined, or no memory is available. |
ENOTBLK | Block device required. |
ENOTDIR | A component of the PathName prefix is not a directory. |
ENXIO | No such device address. |
Other errors are from calls to the device driver's open subroutine or ioctl subroutine.