DEVFS_ADD_DEVSW(9)

NAME
devfs_add_devsw - wire device into devswitch table

SYNOPSIS
#include <sys/devfsext.h>
void *
devfs_add_devsw(char *path, char *name, void *devsw, int minor, int chrblk, uid_t uid, gid_t gid, int perms);

DESCRIPTION
The call that adds an entry into devfs is devfs_add_devsw.

It's arguments are:

path
    the path to the device within DEVFS

name
    the name of the device

devsw
    the address of the devsw entry the name should access

minor
    the minor number

chrblk
    whether the device is CHAR or BLK

uid Owner UID

gid Owner GID

perms
    Permissions (e.g. rwxr--r-- = 0744)

RETURN VALUES
It returns a token that can be used to link another name to the same device (see devfs_link(9)), or destroy the device.

SEE ALSO
devfs_link(9)

HISTORY
The function devfs_add_devsw appeared in FreeBSD 2.2.

AUTHORS
This man page has been written by Joerg Wunsch after a description from Julian Elischer.