Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

alloc_chrdev_region(9) [centos man page]

ALLOC_CHRDEV_REGION(9)						   Char devices 					    ALLOC_CHRDEV_REGION(9)

NAME
alloc_chrdev_region - register a range of char device numbers SYNOPSIS
int alloc_chrdev_region(dev_t * dev, unsigned baseminor, unsigned count, const char * name); ARGUMENTS
dev output parameter for first assigned number baseminor first of the requested range of minor numbers count the number of minor numbers required name the name of the associated device or driver DESCRIPTION
Allocates a range of char device numbers. The major number will be chosen dynamically, and returned (along with the first minor number) in dev. Returns zero or a negative error code. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 ALLOC_CHRDEV_REGION(9)

Check Out this Related Man Page

mknod(5)							File Formats Manual							  mknod(5)

NAME
mknod.h - header file of macros for handling device numbers SYNOPSIS
DESCRIPTION
The header file defines macros to create and interpret device identification numbers for use with the system call (see mknod(2)). The use of these macros is architecture-dependent. See the System Administration Manual for your system for information on how to select major and minor device numbers. contains the macro which packs the major and minor components into a device identification number suitable for the dev argument of and the two macros: which extract the major and minor number components, respectively, from a device identification number, dev. The macro is a specification (see printf(3S)) that prints the minor number in the format best suited to the particular implementation; it is used by the long format of the command (see ls(1)) to show the minor numbers for device files. The base of the number is indicated in the same way as in the C programming language: no leading zero for decimal, leading zero for octal, and leading for hexadecimal. SEE ALSO
ls(1), mknod(1M), mknod(2), printf(3S). mknod(5)
Man Page