devfs_register -- Register a device entry.
(devfs_handle_t dir, const char * name, unsigned int namelen, unsigned int flags, unsigned int major, unsigned int minor, umode_t mode, uid_t uid, gid_t gid, void * ops, void * info);
The handle to the parent devfs directory entry. If this is NULL the
new name is relative to the root of the devfs.
The name of the entry.
The number of characters in name, not including a NULL
terminator. If this is 0, then name must be NULL-terminated and the
length is computed internally.
A set of bitwise-ORed flags (DEVFS_FL_*).
The major number. Not needed for regular files.
The minor number. Not needed for regular files.
The default file mode.
The default UID of the file.
-- undescribed --
The &file_operations or &block_device_operations structure.
This must not be externally deallocated.
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).
Returns a handle which may later be used in a call to devfs_unregister.
On failure NULL is returned.