Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

major - get major component of device number (extension)

&pagelevel(4)&pagelevel

Syntax

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

major_t major(dev_t device);

Description major() returns the major component of the device number for a named device.

Return val.

Formatted device number

if successful.

NODEV

if an error occurs. errno is set to indicate the error.

Errors

major() will fail if:

EINVAL

The device argument is NODEV,
or the major component of device is too large.

See also

makedev(), minor(), mknod(), stat().