makedev - Online Linux Manual PageSection : 3
Updated : 2022-12-15
Source : Linux man-pages 6.03

NAMEmakedev, major, minor − manage a device number

LIBRARYStandard C library (libc, −lc)

SYNOPSIS#include <sys/sysmacros.h>dev_t makedev(unsigned int maj, unsigned int min);unsigned int major(dev_t dev); unsigned int minor(dev_t dev);

DESCRIPTIONA device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type dev_t. Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be given to mknod(2), for example. The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components. These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).

ATTRIBUTESFor an explanation of the terms used in this section, see attributes(7). InterfaceAttributeValue makedev(), major(), minor() Thread safetyMT-Safe

STANDARDSThe makedev(), major(), and minor() functions are not specified in POSIX.1, but are present on many other systems.

NOTESThese interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(), gnu_dev_major(), and gnu_dev_minor(). The latter names are exported, but the traditional names are more portable. The BSDs expose the definitions for these macros via <sys/types.h>. Depending on the version, glibc also exposes definitions for these macros from that header file if suitable feature test macros are defined. However, this behavior was deprecated in glibc 2.25, and since glibc 2.28, <sys/types.h> no longer provides these definitions.

SEE ALSOmknod(2), stat(2)
0
Johanes Gumabo
Data Size   :   8,268 byte
man-gnu_dev_major.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 197,900
Visitor ID   :     :  
Visitor IP   :   18.118.24.176   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.