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

Technical Reference: Base Operating System and Extensions , Volume 2


swapqry Subroutine

Purpose

Returns paging device status.

Library

Standard C Library (libc.a)

Syntax


#include <sys/vminfo.h>


int swapqry (PathName Buffer)
char *PathName;
struct pginfo *Buffer;

Description

The swapqry subroutine returns information to a user-designated buffer about active paging and swap devices.

Parameters


PathName Specifies the full path name of the block device.
Buffer Points to the buffer into which the status is stored.

Return Values

The swapqry subroutine returns 0 if the PathName value is an active paging device. If the Buffer value is not null, it also returns status information.

Error Codes

If an error occurs, the subroutine returns -1 and the errno global variable is set to indicate the error, as follows:

EFAULT Buffer pointer is invalid.
EINVAL Invalid argument.
EINTR Signal was received while processing request.
ENODEV Device is not an active paging device.
ENOENT The PathName file does not exist.
ENOTBLK Block device required.
ENOTDIR A component of the PathName prefix is not a directory.
ENXIO No such device address.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The swapoff subroutine, swapon subroutine.

The swapoff command, swapon command.

Paging Space Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.

Subroutines Overview and Understanding Paging Space Programming Requirements in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


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