.TH "devfs_register" 9 "devfs_register" "25 May 1998" "Kernel Hacker's Manual" LINUX .SH NAME devfs_register \- Register a device entry. .SH SYNOPSIS .B "devfs_handle_t" devfs_register .BI "(devfs_handle_t " dir "," .BI "const char *" name "," .BI "unsigned int " flags "," .BI "unsigned int " major "," .BI "unsigned int " minor "," .BI "umode_t " mode "," .BI "void *" ops "," .BI "void *" info ");" .SH ARGUMENTS .IP "dir" 12 The handle to the parent devfs directory entry. If this is NULL the new name is relative to the root of the devfs. .IP "name" 12 The name of the entry. .IP "flags" 12 A set of bitwise-ORed flags (DEVFS_FL_*). .IP "major" 12 The major number. Not needed for regular files. .IP "minor" 12 The minor number. Not needed for regular files. .IP "mode" 12 The default file mode. .IP "ops" 12 The \fBfile_operations\fP or \fBblock_device_operations\fP structure. This must not be externally deallocated. .IP "info" 12 An arbitrary pointer which will be written to the \fIprivate_data\fP field of the \fBfile\fP 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). .SH "DESCRIPTION" Returns a handle which may later be used in a call to \fBdevfs_unregister\fP. On failure NULL is returned.