Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ identify(9E) — SunOS 5.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

attach(9E)

ddi_get_name(9F)

strcmp(9F)

identify(9E)

NAME

identify − claim to drive a device

SYNOPSIS

#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int prefixidentify(dev_info_t ∗dip

ARGUMENTS

dip A pointer to a dev_info structure. 

INTERFACE LEVEL

SPARC architecture specific (SPARC DDI).  This entry point is Required.  You must write it. 

DESCRIPTION

identify() determines whether this driver drives the device pointed to by dip.

RETURN VALUES

identify() should return:

DDI_IDENTIFIED if it claims to drive this device. 

DDI_NOT_IDENTIFIED
if it does not claim to drive this device. 

EXAMPLE

#define XX_NAME "xx"
static int xxidentify(dev_info_t ∗dip)
{
      if (strcmp(ddi_get_name(dip), XX_NAME) == 0) /∗ name matches device name ∗/
            return(DDI_IDENTIFIED);
      else
            return(DDI_NOT_IDENTIFIED);
}

SEE ALSO

attach(9E), ddi_get_name(9F), strcmp(9F)

WARNINGS

This routine may be called multiple times. It may also be called at any time. The driver should not infer anything from the the sequence or the number of times this entry point has been called. 

SunOS 5.2  —  Last change: 11 Apr 1991

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