Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sdi_name(D3I) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       sdi_name(D3I)                                          sdi_name(D3I)


       NAME
             sdi_name - get name of addressed PDI controller

       SYNOPSIS
             #include <sys/sdi.h>
             void sdi_name(struct scsi_ad *addr, char *name);

          Arguments
             addr  Pointer to the scsi_ad (device address) structure.

             name  String containing the device name.

       DESCRIPTION
             sdi_name decodes a device number into a character string so
             that the device number can be displayed (with cmn_err).

          Return Values
             None.

       USAGE
             This function calls the HBA getinfo(D2I) routine to get the
             controller name, which is copied into name.  The returned
             string should be SDI_NAMELEN in length.  Access to the
             controller name can only be used for display; the driver
             should not attempt to decode the string for other uses.

             The string returned is ``HA #  TC #'', with the controller
             number of the host adapter card and the target controller ID
             filled in.

          Level
             Base or Interrupt.

          Examples
             This example is a sample print routine in a disk target
             driver.  The arguments to the cmn_err function are the device
             number and a string to display (on the system console).

             diskprint(dev, str)
             dev_t dev;
             char *str;
             {
                char name[SDI_NAMELEN]; /* Character array for device name */
                struct scsi_ad addr;    /* SCSI address structure          */

                /* Fill in SCSI device address based on device number */


                           Copyright 1994 Novell, Inc.               Page 1













      sdi_name(D3I)                                          sdi_name(D3I)


               addr.sa_major = emajor(dev);
               addr.sa_minor = eminor(dev);
               addr.sa_lun = LUN(eminor(dev));

               /* Call sdi_name with the address of the SCSI address
                * structure and a pointer to the character array.
                */
               sdi_name(&addr, name);

               /* Print the error message */
               cmn_err(CE_WARN, "%s, Unit %d, Partition %d:  %s", name,
                          addr.sa_lun, eminor(dev) & V_NUMPAR, str);
            }

      REFERENCES
            scsi_ad(D4I)

      NOTICES
         Applicability
            sdi: 1, 2




























                          Copyright 1994 Novell, Inc.               Page 2








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