 |
Index for Section 9 |
|
 |
Alphabetical listing for M |
|
 |
Bottom of page |
|
major(9r)
NAME
major - General: Returns the device major number
SYNOPSIS
#include <sys/types.h>
int major(
dev_t device );
ARGUMENTS
device
Specifies the number of the device whose associated major device number
the major interface will obtain.
DESCRIPTION
The major interface returns the device major number associated with the
device specified by the device argument. Device driver writers use the
dev_t data type to represent a device's major and minor numbers. This data
type is an abstraction of the internal representations of the major and
minor numbers. Driver writers do not need to know how the system
internally represents the major and minor numbers. To ensure maximum
portability of the device driver, use the major interface to extract the
major number portion of this internal representation.
RETURN VALUES
Upon successful completion, major returns the major number portion of the
dev_t passed as the argument.
SEE ALSO
Kernel Interfaces: makedev(9r), minor(9r)
 |
Index for Section 9 |
|
 |
Alphabetical listing for M |
|
 |
Top of page |
|