Device Information Library Functions didevfspath(3DEVINFO)
NAME
didevfspath, didevfsminorpath, dipathdevfspath,
dipathclientdevfspath, didevfspathfree - generate and
free path names
SYNOPSIS
cc [ flag... ] file... -ldevinfo [ library... ]
#include
char *didevfspath(dinodet node);
char *didevfsminorpath(diminort minor);
char *dipathdevfspath(dipatht path);
char *dipathclientdevfspath(dipatht path);
void didevfspathfree(char *pathbuf);
PARAMETERS
node The handle to a device node in a
diinit(3DEVINFO) snapshot.
minor The handle to a device minor node in a snapshot.
path The handle to a device path node in a snapshot.
pathbuf A pointer returned by didevfspath(),
didevfsminorpath(), dipathdevfspath(), or
dipathclientdevfspath().
DESCRIPTION
The didevfspath() function generates the physical path of
the device node specified by node.
The didevfsminorpath() function generates the physical
path of the device minor node specified by minor.
The dipathdevfspath() function generates the pHCI physi-
cal path to the device associated with the specified path
node. The returned string is identical to the
SunOS 5.11 Last change: 15 May 2008 1
Device Information Library Functions didevfspath(3DEVINFO)
didevfspath() for the device had the device not been sup-
ported by multipath.
The dipathclientdevfspath() function generates the vHCI
physical path of the multipath client device node associated
with the device identity of the specified path node. The
returned string is identical to the didevfspath() of the
multipath client device node.
The didevfspathfree() function frees memory that was
allocated to store the path returned by didevfspath(),
didevfsminorpath(), dipathdevfspath(), and
dipathclientdevfspath(). The caller is responsible for
freeing this memory by calling didevfspathfree().
RETURN VALUES
Upon successful completion, the didevfspath(),
didevfsminorpath(), dipathdevfspath(), and
dipathclientdevfspath() functions return a pointer to
the string containing the path to a device node, a device
minor node, or a device path node, respectively. Otherwise,
they return NUL and errno is set to indicate the error. For
a non-NUL return, the path will not have a "/devices" pre-
fix.
ERORS
The didevfspath(), didevfsminorpath(),
dipathdevfspath(), and dipathclientdevfspath() func-
tions will fail if:
EINVAL The node, minor, or path argument is not a valid
handle.
The didevfspath(), didevfsminorpath(),
dipathdevfspath(), and dipathclientdevfspath() func-
tions can also return any error value returned by
malloc(3C).
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 15 May 2008 2
Device Information Library Functions didevfspath(3DEVINFO)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level Safe
SEE ALSO
diinit(3DEVINFO), libdevinfo(3LIB), malloc(3C), attri-
butes(5)
Writing Device Drivers
SunOS 5.11 Last change: 15 May 2008 3
|