Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sdi_errmsg(D3I) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       sdi_errmsg(D3I)                                      sdi_errmsg(D3I)


       NAME
             sdi_errmsg - format and print an error message

       SYNOPSIS
             #include <sys/sdi.h>
             void sdi_errmsg(char *dev_id, struct scsi_ad *addr,
                     struct sb *sbp, struct sense *sense, int type, int err_code);

          Arguments
             dev_id
                   Pointer to a character string giving the device name.

             addr  Pointer to the SCSI address structure for the device
                   returning the error.

             sbp   Pointer to the SCSI block for the request that generated
                   the error.

             sense Pointer to the sense data structure for the request that
                   generated the error.

             type  A code indicating the type of condition that generated
                   the error.

             err_code
                   A code used to uniquely identify this invocation of
                   sdi_errmsg.

       DESCRIPTION
             sdi_errmsg formats and prints cmn_err warning messages.  The
             format and content of the messages changes depending on the
             message type argument.  When the sense data is valid,
             sdi_errmsg also expands the sense data and extended sense data
             into meaningful phrases.  When the sense key indicates a
             recovered error or a not ready condition, the messages go to
             putbuf instead of the system console.  An optional err_code
             can be used to uniquely identify messages.  No validity
             checking is performed on any of the values specified.

          Return Values
             None.

       USAGE
             sdi_errmsg is used in the existing target drivers to format
             and print error messages.  It supports the production of
             messages in a common format.  It should be used whenever a


                           Copyright 1994 Novell, Inc.               Page 1













      sdi_errmsg(D3I)                                      sdi_errmsg(D3I)


            non-fatal error condition is to be presented at the system
            console.  This routine produces CE_WARN error messages.

            The argument dev_id should point to a string which will be
            used to identify the target returning an error.  Typically,
            this is a single word like ``Disk'' or ``Tape.''  The argument
            addr is used along with the LUN contained in the structure
            pointed to by sbp to construct a SCSI-like name for the device
            returning the error.  This combination results in a string
            like ``HA x TC x LU x,'' where the xs are replaced by HBA
            number, target number and logical unit number.

            The four supported values for type are:

            SDI_SFB_ERR
                  Interprets the sbp as an SFB and extracts only the
                  logical unit and SDI completion code from the sbp.  The
                  other values for type cause the routine to interpret the
                  sbp as an SCB.  This allows the routine to extract and
                  print the relevant information from the sbp.

            SDI_CKCON_ERR
                  Expands the available sense information into phrases.
                  This allows the production of meaningful error messages.

            SDI_CKSTAT_ERR
                  Prints the target status information available in the
                  SCB as part of the text.

            SDI_DEFAULT_ERR
                  Prints the SDI completion code as part of the message
                  text.

            If err_code, defined by the target driver, is non-zero, it is
            printed as a hexadecimal number on the end of the first line
            of the error output.  This may be useful to identify exactly
            where in a driver the call to sdi_errmsg occurred, if all the
            invocations are uniquely numbered.

         Level
            Base only.

      REFERENCES
            sb(D4I), scb(D4I), scsi_ad(D4I), sfb(D4I)




                          Copyright 1994 Novell, Inc.               Page 2













       sdi_errmsg(D3I)                                      sdi_errmsg(D3I)


       NOTICES
          Applicability
             sdi: 1, 2













































                           Copyright 1994 Novell, Inc.               Page 3








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026