devfs_get_handle(9)
NAME
devfs_get_handle - Find the handle of a devfs entry.
SYNOPSIS
devfs_handle_t devfs_get_handle (devfs_handle_t dir, const char *name, unsigned int major, unsigned int minor, char type, int traverse_symlinks);
ARGUMENTS
- dir The handle to the parent devfs directory
- entry. If this is NULL the name is relative to
the root of the devfs. - name The name of the entry.
- major The major number. This is used if name is
- NULL.
- minor The minor number. This is used if name is
- NULL.
- type The type of special file to search for. This
- may be either DEVFS_SPECIAL_CHR or DEVFS_SPE
CIAL_BLK. - traverse_symlinks
- If TRUE then symlink entries in the devfs
- namespace are traversed. Symlinks pointing out
of the devfs namespace will cause a failure.
Symlink traversal consumes stack space.
DESCRIPTION
- Returns a handle which may later be used in a call to
devfs_unregister, devfs_get_flags, or devfs_set_flags. A subsequent devfs_put is required to decrement the ref count. On failure NULL is returned.