[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

swapoff Subroutine

Purpose

Deactivates paging or swapping to a designated block device.

Library

Standard C Library (libc.a)

Syntax


int swapoff (PathName)
char *PathName;

Description

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.

Parameters

PathName Specifies the full path name of the block device or logical volume.

Error Codes

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.

Related Information

The swapoff command.

The Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]