GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MAJOR (3)

NAME

makedev, major, minor - device number conversion

CONTENTS

Synopsis
Description
Return Values
See Also

SYNOPSIS


.In sys/types.h dev_t makedev int major int minor int major dev_t dev int minor dev_t dev

DESCRIPTION

The makedev macro allows a unique device number to be generated based on its major and minor number. The major and minor macros can be used to obtain the original numbers from the device number dev.

In previous implementations of
.Fx all block and character devices were uniquely identified by a pair of major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later versions of
.Fx automatically generate a unique device number for each character device visible in /dev/. These numbers are not divided in device classes.

On
.Fx these macros are only used by utilities that need to exchange numbers with other operating systems that may use different encodings for
.Vt dev_t , but also applications that present these numbers to the user in a more conventional way.

RETURN VALUES

The major macro returns a device major number that has a value between 0 and 255. The minor macro returns a device minor number whose value can span the complete range of an
.Vt int .

SEE ALSO

devfs(5), devname(3), mknod(2)
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.