1di_devfs_path(3DEVINFOD)evice Information Library Functiondsi_devfs_path(3DEVINFO)
2
3
4

NAME

6       di_devfs_path,         di_devfs_minor_path,         di_path_devfs_path,
7       di_path_client_devfs_path, di_devfs_path_free - generate and free  path
8       names
9

SYNOPSIS

11       cc [ flag... ] file... -ldevinfo [ library... ]
12       #include <libdevinfo.h>
13
14       char *di_devfs_path(di_node_t node);
15
16
17       char *di_devfs_minor_path(di_minor_t minor);
18
19
20       char *di_path_devfs_path(di_path_t path);
21
22
23       char *di_path_client_devfs_path(di_path_t path);
24
25
26       void di_devfs_path_free(char *path_buf);
27
28

PARAMETERS

30       node        The  handle  to  a device node in a di_init(3DEVINFO) snap‐
31                   shot.
32
33
34       minor       The handle to a device minor node in a snapshot.
35
36
37       path        The handle to a device path node in a snapshot.
38
39
40       path_buf    A      pointer      returned      by       di_devfs_path(),
41                   di_devfs_minor_path(),       di_path_devfs_path(),       or
42                   di_path_client_devfs_path().
43
44

DESCRIPTION

46       The di_devfs_path() function generates the physical path of the  device
47       node specified by node.
48
49
50       The  di_devfs_minor_path()  function generates the physical path of the
51       device minor node specified by minor.
52
53
54       The di_path_devfs_path() function generates the pHCI physical  path  to
55       the device associated with the specified path node. The returned string
56       is identical to the di_devfs_path()  for the device had the device  not
57       been supported by multipath.
58
59
60       The  di_path_client_devfs_path()  function  generates the vHCI physical
61       path of the multipath client device node  associated  with  the  device
62       identity  of  the specified path node. The returned string is identical
63       to the di_devfs_path() of the multipath client device node.
64
65
66       The di_devfs_path_free() function frees memory that  was  allocated  to
67       store  the  path  returned  by  di_devfs_path(), di_devfs_minor_path(),
68       di_path_devfs_path(), and di_path_client_devfs_path().  The  caller  is
69       responsible for freeing this memory by calling di_devfs_path_free().
70

RETURN VALUES

72       Upon successful completion, the di_devfs_path(), di_devfs_minor_path(),
73       di_path_devfs_path(), and di_path_client_devfs_path() functions  return
74       a  pointer to the string containing the path to a device node, a device
75       minor node, or a device path node, respectively. Otherwise, they return
76       NULL and errno is set to indicate the error. For a non-NULL return, the
77       path will not have a "/devices" prefix.
78

ERRORS

80       The di_devfs_path(), di_devfs_minor_path(),  di_path_devfs_path(),  and
81       di_path_client_devfs_path() functions will fail if:
82
83       EINVAL    The node, minor, or path argument is not a valid handle.
84
85
86
87       The  di_devfs_path(),  di_devfs_minor_path(), di_path_devfs_path(), and
88       di_path_client_devfs_path() functions can also return any  error  value
89       returned by malloc(3C).
90

ATTRIBUTES

92       See attributes(5)  for descriptions of the following attributes:
93
94
95
96
97       ┌─────────────────────────────┬─────────────────────────────┐
98       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
99       ├─────────────────────────────┼─────────────────────────────┤
100       │Interface Stability          │Committed                    │
101       ├─────────────────────────────┼─────────────────────────────┤
102       │MT-Level                     │Safe                         │
103       └─────────────────────────────┴─────────────────────────────┘
104

SEE ALSO

106       di_init(3DEVINFO), libdevinfo(3LIB), malloc(3C), attributes(5)
107
108
109       Writing Device Drivers
110
111
112
113SunOS 5.11                        15 May 2008          di_devfs_path(3DEVINFO)
Impressum