devfs_register(9)
NAME
devfs_register - Register a device entry.
SYNOPSIS
devfs_handle_t devfs_register (devfs_handle_t dir, const char *name, unsigned int flags, unsigned int major, unsigned int minor, umode_t mode, void *ops, void *info);
ARGUMENTS
- dir The handle to the parent devfs directory
- entry. If this is NULL the new name is rela
tive to the root of the devfs. - name The name of the entry.
- flags A set of bitwise-ORed flags (DEVFS_FL_*).
- major The major number. Not needed for regular
- files.
- minor The minor number. Not needed for regular
- files.
- mode The default file mode.
- ops The file_operations or block_device_opera
- tions structure. This must not be externally
deallocated. - info An arbitrary pointer which will be written to
- the private_data field of the file structure
passed to the device driver. You can set this
to whatever you like, and change it once the
file is opened (the next file opened will not
see this change).
DESCRIPTION
- Returns a handle which may later be used in a call to
devfs_unregister. On failure NULL is returned.