man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

makedevice(9F)

Name

makedevice - make device number from major and minor numbers

Synopsis

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

dev_t makedevice(major_t majnum, minor_t minnum);

Interface Level

Architecture independent level 1 (DDI/DKI).

Parameters

majnum

Major device number.

minnum

Minor device number.

Description

The makedevice() function creates a device number from a major and minor device number. makedevice() should be used to create device numbers so the driver will port easily to releases that treat device numbers differently.

Return Values

The device number, containing both the major number and the minor number, is returned. No validation of the major or minor numbers is performed.

Context

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

See Also

getmajor(9F), getminor(9F)