.TH etoimajor() "" "" "DDI/DKI Kernel Routine"
.PC "Convert external major-device number to internal"
.B "#include <sys/types.h>"
.B "#include <sys/ddi.h>"
\fBmajor_t etoimajor(\fIexternal\^\fB)\fR
\fBmajor_t \fIexternal\^\fB;\fR
.PP
.B etoimajor()
converts the external major-device number
.I external
to an internal major-device number.
If all goes well,
.B etoimajor()
returns the internal major number.
If
.I external
is not valid, it returns
.BR NODEV .
.SH "See Also"
.B
DDI/DKI kernel routines,
getemajor(),
geteminor(),
getmajor(),
getminor(),
itoemajor(),
makedevice().
.R
.SH Notes
.B etoimajor()
has base or interrupt level.
It does not sleep.
.PP
A driver can hold a
driver-defined basic lock, read/write lock, or sleep lock
across a call to this function.
