1makedevice(9F) Kernel Functions for Drivers makedevice(9F)
2
3
4
6 makedevice - make device number from major and minor numbers
7
9 #include <sys/types.h>
10 #include <sys/mkdev.h>
11 #include <sys/ddi.h>
12
13
14
15 dev_t makedevice(major_t majnum, minor_t minnum);
16
17
19 Architecture independent level 1 (DDI/DKI).
20
22 majnum Major device number.
23
24
25 minnum Minor device number.
26
27
29 The makedevice() function creates a device number from a major and
30 minor device number. makedevice() should be used to create device num‐
31 bers so the driver will port easily to releases that treat device num‐
32 bers differently.
33
35 The device number, containing both the major number and the minor num‐
36 ber, is returned. No validation of the major or minor numbers is per‐
37 formed.
38
40 The makedevice() function can be called from user, interrupt, or kernel
41 context.
42
44 getmajor(9F), getminor(9F)
45
46
47
48SunOS 5.11 16 Jan 2006 makedevice(9F)