di_drv_first_node(3devinfo) 맨 페이지 - 윈디하나의 솔라나라

개요

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

di_drv_first_node(3devinfo)

Device Information Library Functions                   di_child_node(3DEVINFO)



NAME
       di_child_node,   di_parent_node,   di_sibling_node,  di_drv_first_node,
       di_drv_next_node - libdevinfo node traversal functions

SYNOPSIS
       cc [ flag... ] file... -ldevinfo [ library... ]
       #include <libdevinfo.h>

       di_node_t di_child_node(di_node_t node);


       di_node_t di_parent_node(di_node_t node);


       di_node_t di_sibling_node(di_node_t node);


       di_node_t di_drv_first_node(const char *drv_name, di_node_t root);


       di_node_t di_drv_next_node(di_node_t node);

PARAMETERS
       drv_name    The name of the driver of interest.


       node        A handle to any node in the snapshot.


       root        The handle of the root node for the  snapshot  returned  by
                   di_init(3DEVINFO).


DESCRIPTION
       The  kernel device configuration data may be viewed in two ways, either
       as a tree of device configuration nodes or as a list of  nodes  associ‐
       ated  with  each driver. In the tree view, each node may contain refer‐
       ences to its parent, the next sibling in a list of  siblings,  and  the
       first  child  of  a list of children. In the per-driver view, each node
       contains a reference to the next node associated with the same  driver.
       Both  views  are  captured in the snapshot, and the interfaces are pro‐
       vided for node access.


       The di_child_node() function obtains a handle to  the  first  child  of
       node.  If no child node exists in the snapshot, DI_NODE_NIL is returned
       and errno is set to ENXIO or ENOTSUP.


       The di_parent_node() function obtains a handle to the  parent  node  of
       node. If no parent node exists in the snapshot, DI_NODE_NIL is returned
       and errno is set to ENXIO or ENOTSUP.


       The di_sibling_node() function obtains a handle  to  the  next  sibling
       node  of  node.  If  no  next  sibling  node  exists  in  the snapshot,
       DI_NODE_NIL is returned and errno is set to ENXIO or ENOTSUP.


       The di_drv_first_node() function obtains a handle  to  the  first  node
       associated  with  the driver specified by drv_name. If there is no such
       driver, DI_NODE_NIL is returned with errno is set  to  EINVAL.  If  the
       driver  exists  but  there  is  no  node  associated  with this driver,
       DI_NODE_NIL is returned and errno is set to ENXIO or ENOTSUP.


       The di_drv_next_node() function returns a handle to the next node bound
       to the same driver. If no more nodes exist, DI_NODE_NIL is returned.

RETURN VALUES
       Upon   successful   completion,   a   handle  is  returned.  Otherwise,
       DI_NODE_NIL is returned and errno is set to indicate the error.

ERRORS
       These functions will fail if:

       EINVAL     The argument is invalid.


       ENXIO      The requested node does not exist.


       ENOTSUP    The node was not found in the snapshot, but it may exist  in
                  the  kernel. This error may occur if the snapshot contains a
                  partial device tree.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe


SEE ALSO
       di_init(3DEVINFO), libdevinfo(3LIB), attributes(7)


       Writing Device Drivers in Oracle Solaris 11.4



Oracle Solaris 11.4               1 Dec 1998           di_child_node(3DEVINFO)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3