Determines the completion status of the buffer.
#include <sys/types.h> #include <sys/errno.h> #include <sys/buf.h>
int geterror (bp) struct buf *bp;
bp | Specifies the address of the buffer structure whose status is to be checked. |
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).
The geterror kernel service can be called from either the process or interrupt environment.
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. |
The geterror kernel service is part of Base Operating System (BOS) Runtime.
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.