Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Device Information Library Functionsdi_devfs_path(3DEVINFO)


NAME

 di_devfs_path, di_devfs_path_free - generate and free physical path names

SYNOPSIS

 
cc [ flag... ] file... -ldevinfo [ library... ]
#include <libdevinfo.h>
char *di_devfs_path(di_node_t node);
 void di_devfs_path_free(char *path_buf);

PARAMETERS

 
node
Handle to a device node in the snapshot.
path_buf
Pointer returned by di_devfs_path().

DESCRIPTION

 

The di_devfs_path() function generates the physical path of the device node. The caller is responsible for freeing the memory allocated to store the physical path by calling di_devfs_path_free().

The di_devfs_path_free() function frees memory that was allocated by di_devfs_path().

RETURN VALUES

 

The di_devfs_path() function returns a pointer to the string containing the physical path of node.

ERRORS

 

The di_devfs_path() function will fail if:

EINVAL
The node argument is not a valid handle.

The di_devfs_path() function can also return any error code from malloc(3C).

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityEvolving
MT-LevelSafe

SEE ALSO

 

malloc(3C), libdevinfo(3DEVINFO), attributes(5)

Writing Device Drivers


SunOS 5.9Go To TopLast Changed 1 Dec 1998

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.