Device Information Library Functions didevlinkdup(3DEVINFO)
NAME
didevlinkdup, didevlinkfree - copy and free a devlink
object
SYNOPSIS
cc [ flag... ] file... -ldevinfo [ library... ]
#include
didevlinkt didevlinkdup(didevlinkt devlink);
int didevlinkfree(didevlinkt devlink);
PARAMETERS
devlink An opaque handle to a devlink.
DESCRIPTION
Typically, a didevlinkt object is only accessible from
within the scope of the didevlinkwalk(3DEVINFO) callback
function. The didevlinkdup() function allows the callback
function implementation to make a duplicate copy of the
didevlinkt object. The duplicate copy is valid and acces-
sible until didevlinkfree() is called.
The didevlinkdup() function returns a copy of a devlink
object. The didevlinkfree() function frees this copy.
RETURN VALUES
Upon successful completion, didevlinkdup() returns a copy
of the devlink object passed in. Otherwise, NUL is
returned and errno is set to indicate the error.
Upon successful completion, didevlinkfree() returns 0.
Otherwise, -1 is returned and errno is set to indicate the
error.
ERORS
The didevlinkdup() and didevlinkfree() functions will
fail if:
EINVAL The devlink argument is not a valid handle.
The didevlinkdup() function can set errno to any error
value that can also be set by malloc(3C).
SunOS 5.11 Last change: 15 May 2008 1
Device Information Library Functions didevlinkdup(3DEVINFO)
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level Safe
SEE ALSO
didevlinkinit(3DEVINFO), didevlinkpath(3DEVINFO),
didevlinkwalk(3DEVINFO), libdevinfo(3LIB), malloc(3C),
attributes(5)
SunOS 5.11 Last change: 15 May 2008 2
|