Go to the previous, next section.
int swapon(const char *path);
int swapoff(const char *path);
path: [in] points to the path to add/remove.
swapon adds the swap area specified by path to the
swap pool. swapoff removes the swap area specified by
path from the swap pool. The calling task must have superuser
privileges.
On success zero is returned. On error -1 is returned and errno
is set to one of the following:
EPERM: the calling task does not have superuser privileges.
EINVAL: path is not a block device nor a regular path.
ENOENT or ENOMEM.