[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

geterror Kernel Service

Purpose

Determines the completion status of the buffer.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/buf.h>
int geterror (bp)
struct buf  *bp;

Parameter

bp Specifies the address of the buffer structure whose status is to be checked.

Description

The geterror kernel service checks the specified buffer to see if the b_error flag is set. If that flag is not set, the geterror service returns 0. Otherwise, it returns the nonzero B_ERROR value or the EIO value (if b_error is 0).

Execution Environment

The geterror kernel service can be called from either the process or interrupt environment.

Return Values

0 Indicates that no I/O error occurred on the buffer.
b_error value Indicates that an I/O error occurred on the buffer.
EIO Indicates that an unknown I/O error occurred on the buffer.

Implementation Specifics

The geterror kernel service is part of Base Operating System (BOS) Runtime.

Related Information

Block I/O Buffer Cache Kernel Services: Overview and I/O Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]