#include <sys/types.h>
sys/types.h
functionmajor
static inline __int32_t major(__uint32_t _x)
▾
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/types.h
Returns the major device number encoded in a dev_t: the top 8 bits (bits 24-31). Inline function form of the traditional major() macro, used for C++ where the lowercase macro would collide with member functions.
functionminor
static inline __int32_t minor(__uint32_t _x)
▾
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/types.h
Returns the minor device number encoded in a dev_t: the low 24 bits. Inline function form of the traditional minor() macro.
functionmakedev
static inline dev_t makedev(__uint32_t _major, __uint32_t _minor)
▾
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/types.h
Constructs a dev_t from a major and minor device number: the major number in the top 8 bits, the minor number in the low 24 bits. Inline function form of the traditional makedev() macro.