Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ devinfo(D2) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       devinfo(D2)                                              devinfo(D2)


       NAME
             devinfo - obtain information about a character or block device

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/buf.h>
             #include <sys/conf.h>
             #include <sys/errno.h>
             #include <sys/ddi.h>
             int prefixdevinfo(dev_t dev, di_parm_t parm, void **valp);

          Arguments
             dev          Device number.

             parm         Type of information required from the driver.
                          Possible values are DI_BCBP and DI_MEDIA.
                          Argument DI_BCBP should be used when the bcb (D4)
                          structure for the device is needed and DI_MEDIA
                          should be used when the media type information is
                          needed for the device.

             valp         This is an outarg from the driver to the caller.
                          The valp pointer is dependent on the type of
                          request made by the caller.  The possible return
                          types are a pointer to string (char *) indicating
                          the type of media when the request is of DI_MEDIA
                          type and the return type is a pointer to the
                          breakup control block bcb(D4) structure for the
                          device when the request is of type DI_BCBP.

       DESCRIPTION
             The devinfo(D2) routine provides a way for a caller to obtain
             information about the character and block devices of interest.

             The type of information that can be returned includes media
             type of the device (example: disk, tape, cd-rom, worm disk,
             etc.).  The other possible return type is a pointer to the
             Breakup Control Block structure for the device.  This would
             indicate the I/O properties of the device.

          Return Values
             The devinfo routine returns 0 on success or a non-zero value
             on failure which indicates the error number.





                           Copyright 1994 Novell, Inc.               Page 1













      devinfo(D2)                                              devinfo(D2)


      USAGE
            This entry point is optional and is valid for character and
            block device drivers.

            prefixdevinfo will only be called while the device is open.

      REFERENCES
            bcb(D4), errnos(D5)

      NOTICES
         Portability
            All processors

         Applicability
            ddi: 5, 5mp, 6, 6mp, 7, 7mp

































                          Copyright 1994 Novell, Inc.               Page 2








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