Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dev_to_drivername(2) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

attr(1)

hwgraph(4)



DEVTODRIVERNAME(2)                                      DEVTODRIVERNAME(2)



NAME
     dev_to_drivername - determine the driver name  for the device

C SYNOPSIS
     #include <invent.h>

     int devtodrivername (devt dev, char *buf, int *length);

OVERVIEW
     dev_to_drivername is useful to determine the name of the driver handling
     the device.

DESCRIPTION
     The dev_to_drivername function provides a way to retrieve the name of the
     device driver handling the device.

     Dev identifies the device, buf is the placeholder for the driver name and
     length is an input/output argument that on the call to dev_to_drivername
     should contain the maximum size of the name the process is willing to
     accept.  On return, the length will have been modified to show the actual
     size of the device driver name returned.

     dev_to_drivername will fail if one or more of the following are true:

     [E2BIG]
          The driver name  is too large to fit into the buffer.  The integer
          that the valuelength argument points to has been modified to show
          the actual numnber of bytes that would be required to store the
          value of that attribute.

     [ENODEV]
          The device does not exist.

     [EPERM]
          The effective user ID does not match the owner of the file and the
          effective user ID is not super-user.

     [EFAULT]
          Buf, or length points outside the allocated address space of the
          process.

SEE ALSO
     attr(1), hwgraph(4)

DIAGNOSTICS
     Upon successful completion, the name is returned.  Otherwise, a value of
     NULL is returned and errno is set to indicate the error.








                                                                        Page 1



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