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

Technical Reference: Kernel and Subsystems, 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.

Related Information

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

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