DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

deverr(D3oddi)


deverr -- print a device error message on the console

Synopsis

#include <sys/cmn_err.h>

void deverr(struct iobuf *iobuf_ptr, int cmd, int status, char *dn);

Description

The deverr function prints an error message on the system console together with some device-specific information acquired from the parameters passed to the routine. This routine can only be used in a block device driver.

Arguments

iobuf_ptr is a pointer to the head of the I/O request queue for the device. cmd contains driver-specific information, such as the controller information from the failed I/O operation. status contains driver-specific information, such as the controller status information from the time of failure. dn is a pointer to a string containing the device name.

Return values

None.

Usage

The deverr routine utilizes the following display call:
   cmn_err(CE_WARN,
       "%s: %s error on dev %u/%u, block=%ld cmd=0x%x status=0x%x",
       dn, (bp->b_flags & B_READ) ? "Read" : "Write",
       emajor(bp->b_dev), eminor(bp->b_dev), bp->b_blkno, cmd, status);
bp is defined as iobuf_ptr->b_actf.

This produces a warning message in the following format:

   WARNING: dn: R/W error on major/minor,
            block=blk cmd=cmd status=status
The message fields are defined as follows:

dn
device name argument dn to deverr

R/W
``Read'', or ``Write'', depending on context

major
major device number

minor
minor device number

blk
block number

cmd
cmd argument to deverr

status
status argument to deverr

Context and synchronization

All contexts.

Hardware applicability

All

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

DDI does not support this function. When porting to DDI, replace calls to this function with calls to the cmn_err(D3) function.

References

cmn_err(D3oddi), printf(D3oddi)

``Error handling'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005