2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH DI_DEVFS_PATH 3DEVINFO "May 15, 2008"
8 di_devfs_path, di_devfs_minor_path, di_path_devfs_path,
9 di_path_client_devfs_path, di_devfs_path_free \- generate and free path names
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-ldevinfo\fR [ \fIlibrary\fR... ]
14 #include <libdevinfo.h>
16 \fBchar *\fR\fBdi_devfs_path\fR(\fBdi_node_t\fR \fInode\fR);
21 \fBchar *\fR\fBdi_devfs_minor_path\fR(\fBdi_minor_t\fR \fIminor\fR);
26 \fBchar *\fR\fBdi_path_devfs_path\fR(\fBdi_path_t\fR \fIpath\fR);
31 \fBchar *\fR\fBdi_path_client_devfs_path\fR(\fBdi_path_t\fR \fIpath\fR);
36 \fBvoid\fR \fBdi_devfs_path_free\fR(\fBchar *\fR\fIpath_buf\fR);
46 The handle to a device node in a \fBdi_init\fR(3DEVINFO) snapshot.
55 The handle to a device minor node in a snapshot.
64 The handle to a device path node in a snapshot.
73 A pointer returned by \fBdi_devfs_path()\fR, \fBdi_devfs_minor_path()\fR,
74 \fBdi_path_devfs_path()\fR, or \fBdi_path_client_devfs_path()\fR.
80 The \fBdi_devfs_path()\fR function generates the physical path of the device
81 node specified by \fInode\fR.
84 The \fBdi_devfs_minor_path()\fR function generates the physical path of the
85 device minor node specified by \fIminor\fR.
88 The \fBdi_path_devfs_path()\fR function generates the pHCI physical path to the
89 device associated with the specified path node. The returned string is
90 identical to the \fBdi_devfs_path()\fR for the device had the device not been
91 supported by multipath.
94 The \fBdi_path_client_devfs_path()\fR function generates the vHCI physical path
95 of the multipath client device node associated with the device identity of the
96 specified path node. The returned string is identical to the
97 \fBdi_devfs_path()\fR of the multipath client device node.
100 The \fBdi_devfs_path_free()\fR function frees memory that was allocated to
101 store the path returned by \fBdi_devfs_path()\fR, \fBdi_devfs_minor_path()\fR,
102 \fBdi_path_devfs_path()\fR, and \fBdi_path_client_devfs_path()\fR. The caller
103 is responsible for freeing this memory by calling \fBdi_devfs_path_free()\fR.
107 Upon successful completion, the \fBdi_devfs_path()\fR,
108 \fBdi_devfs_minor_path()\fR, \fBdi_path_devfs_path()\fR, and
109 \fBdi_path_client_devfs_path()\fR functions return a pointer to the string
110 containing the path to a device node, a device minor node, or a device path
111 node, respectively. Otherwise, they return \fINULL\fR and \fBerrno\fR is set to
112 indicate the error. For a non-NULL return, the path will not have a
113 "/\fBdevices\fR" prefix.
117 The \fBdi_devfs_path()\fR, \fBdi_devfs_minor_path()\fR,
118 \fBdi_path_devfs_path()\fR, and \fBdi_path_client_devfs_path()\fR functions
126 The \fInode\fR, \fIminor\fR, or \fIpath\fR argument is not a valid handle.
131 The \fBdi_devfs_path()\fR, \fBdi_devfs_minor_path()\fR,
132 \fBdi_path_devfs_path()\fR, and \fBdi_path_client_devfs_path()\fR functions can
133 also return any error value returned by \fBmalloc\fR(3C).
137 See \fBattributes\fR(5) for descriptions of the following attributes:
145 ATTRIBUTE TYPE ATTRIBUTE VALUE
147 Interface Stability Committed
155 \fBdi_init\fR(3DEVINFO), \fBlibdevinfo\fR(3LIB), \fBmalloc\fR(3C),
159 \fIWriting Device Drivers\fR