ddi_dev_is_sid(9f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

ddi_dev_is_sid(9f)

ddi_dev_is_sid(9F)             Kernel Functions             ddi_dev_is_sid(9F)



NAME
       ddi_dev_is_sid - tell whether a device is self-identifying

SYNOPSIS
       #include <sys/conf.h>
       #include <sys/ddi.h>
       #include <sys/sunddi.h>

       int ddi_dev_is_sid(dev_info_t *dip);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       dip    A pointer to the device's dev_info structure.


DESCRIPTION
       The  ddi_dev_is_sid()  function  tells  the  caller  whether the device
       described by dip is  self-identifying,  that  is,  a  device  that  can
       unequivocally  tell the system that it exists. This is useful for driv‐
       ers that support both a self-identifying as well as a  non-self-identi‐
       fying variants of a device (and therefore must be probed).

RETURN VALUES
       DDI_SUCCESS    Device is self-identifying.


       DDI_FAILURE    Device is not self-identifying.


CONTEXT
       The  ddi_dev_is_sid()  function  can be called from user, interrupt, or
       kernel context.

EXAMPLES
         1   ...
         2   int
         3   bz_probe(dev_info_t *dip)
         4   {
         5    ...
         6    if (ddi_dev_is_sid(dip) == DDI_SUCCESS) {
         7         /*
         8          * This is the self-identifying version (OpenBoot).
         9          * No need to probe for it because we know it is there.
         10         * The existence of dip && ddi_dev_is_sid() proves this.
         11         */
         12             return (DDI_PROBE_DONTCARE);
         13   }
         14   /*
         15    * Not a self-identifying variant of the device. Now we have to
         16    * do some work to see whether it is really attached to the
         17    * system.
         18    */
         19  ...


SEE ALSO
       Writing Device Drivers in Oracle Solaris 11.4  probe(9E)



Oracle Solaris 11.4               16 Jan 2006               ddi_dev_is_sid(9F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3