DEVERR(K) UNIX System V DEVERR(K)
Name
deverr - prints a device error message on the console
Syntax
#include "sys/cmn_err.h"
int
deverr(iobuf-ptr, cmd, status, dev)
struct iobuf *iobuf-ptr;
int cmd, status;
char *dev;
Description
The deverr routine 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.
deverr utilizes the following display call:
cmn_err(CE_WARN, "error on dev %s (%u/%u), block=%D cmd=%x
status=%x\n", dev, major(bp->b_dev),
minor(bp->b_dev), bp->b_blkno, cmd, status);
bp is defined as follows: bp=iobuf-ptr->b_actf
This produces a warning message in the following format:
WARNING: error on dev dev (major/minor), block=blk
cmd=cmd status=status
Where:
dev The dev (device name) argument to deverr
major Major device number
minor Minor device number
blk Block number
cmd The cmd argument to deverr
status The status argument to deverr
Parameters
The iobuf-ptr argument is a pointer to the head of the I/O
request queue for the device.
The cmd argument contains driver-specific information, such
as the controller information from the failed I/O operation.
The status argument contains driver-specific information,
such as the controller status information from the time of
failure.
The dev argument is a pointer to a string containing the
device name.
See Also
cmn_err(K), printf(K)
(printed 7/6/89)