Deactivates paging or swapping to a designated block device.
Standard C Library (libc.a)
int swapoff (PathName)
char *PathName;
The swapoff subroutine deactivates a block device or logical volume that is actively being used for paging and swapping. There must be sufficient space to satisfy the system's paging space requirements in the remaining devices after this device is deactivated or swapoff will fail.
PathName | Specifies the full path name of the block device or logical volume. |
If an error occurs, the errno global variable is set to indicate the error:
EBUSY | The deactivation is already running. |
EINTR | The signal was received during the processing of a request. |
ENODEV | The PathName file does not exist. |
ENOMEM | No memory is available. |
ENOSPC | There is not enough space in other paging spaces to satisfy the system's requirements. |
ENOTBLK | The device must be a block device or logical volume. |
ENOTDIR | A component of the PathName prefix is not a directory. |
EPERM | Caller does not have proper authority. |
Other errors are from calls to the device driver's open subroutine or ioctl subroutine.
The swapoff command.
The Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.