man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

getminor(9F)

Name

getminor - get minor device number

Synopsis

#include <sys/types.h>
#include <sys/mkdev.h>
#include <sys/ddi.h>

minor_t getminor(dev_t dev);

Interface Level

Architecture independent level 1 (DDI/DKI).

Parameters

dev

Device number.

Description

The getminor() function extracts the minor number from a device number.

Return Values

The minor number.

Context

The getminor() function can be called from user, interrupt, or kernel context.

Examples

See the getmajor(9F) manual page for an example of how to use getminor().

See Also

getmajor(9F), makedevice(9F)

Writing Device Drivers for Oracle Solaris 11.2

Warnings

No validity checking is performed. If dev is invalid, an invalid number is returned.