DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

bioerror(D3)


bioerror -- manipulate error fields within a buffer header

Synopsis

   #include <sys/types.h>
   #include <sys/buf.h>
   #include <sys/ddi.h>
   

void bioerror(buf_t *bp, int errno);

Description

bioerror( ) is used to manipulate the error fields within a buf(D4) structure, usually as a return from the strategy(D2) or biostart(D2) entry point routine.

Arguments


bp
Pointer to the buffer header structure.

errno
Error number to be set, or zero to indicate that the error fields within the buffer header should be cleared.

Return values

None

Usage

Driver code (usually the biostart(D2) or strategy(D2) routine) that wishes to report an I/O error condition associated with the buffer pointed to by bp should call bioerror( ) with errno set to the appropriate error number. This sets the appropriate members of the buffer header so that higher level code can detect the error and retrieve the error number using the geterror(D3) function.

The error fields within the buffer header can be cleared by calling the bioerror( ) function with errno set to zero.

Context and synchronization

Non-blockable, interrupt, user, or blockable context.

Hardware applicability

All

Version applicability

ddi: 3, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

SCO OpenServer ODDI compatibility

SCO OpenServer and other earlier operating systems do not support the bioerror( ) function. Instead, errors that occurrred during a block I/O transfer are reported by setting the b_error and b_flags members of the buf(D4) structure. This practice is not allowed for DDI drivers written for one of the multiprocessing DDI versions, and is not recommended for any DDI driver.

References

biostart(D2), buf(D4), errnos(D5), geteblk(D3), geterror(D3), getrbuf(D3), ngeteblk(D3), strategy(D2)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005