Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

major(3c) [opensolaris man page]

makedev(3C)						   Standard C Library Functions 					       makedev(3C)

NAME
makedev, major, minor - manage a device number SYNOPSIS
#include <sys/types.h> #include <sys/mkdev.h> dev_t makedev(major_t maj, minor_t min); major_t major(dev_t device); minor_t minor(dev_t device); DESCRIPTION
The makedev() function returns a formatted device number on success and NODEV on failure. The maj argument is the major number. The min argument is the minor number. The makedev() function can be used to create a device number for input to mknod(2). The major() function returns the major number component from device. The minor() function returns the minor number component from device. RETURN VALUES
Upon successful completion, makedev() returns a formatted device number. Otherwise, NODEV is returned and errno is set to indicate the error. ERRORS
The makedev() function will fail if: EINVAL One or both of the arguments maj and min is too large, or the device number created from maj and min is NODEV. The major() function will fail if: EINVAL The device argument is NODEV, or the major number component of device is too large. The minor() function will fail if: EINVAL The device argument is NODEV. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mknod(2), stat(2), attributes(5) SunOS 5.11 29 Dec 1996 makedev(3C)

Check Out this Related Man Page

makedev(3C)						   Standard C Library Functions 					       makedev(3C)

NAME
makedev, major, minor - manage a device number SYNOPSIS
#include <sys/types.h> #include <sys/mkdev.h> dev_t makedev(major_t maj, minor_t min); major_t major(dev_t device); minor_t minor(dev_t device); DESCRIPTION
The makedev() function returns a formatted device number on success and NODEV on failure. The maj argument is the major number. The min argument is the minor number. The makedev() function can be used to create a device number for input to mknod(2). The major() function returns the major number component from device. The minor() function returns the minor number component from device. RETURN VALUES
Upon successful completion, makedev() returns a formatted device number. Otherwise, NODEV is returned and errno is set to indicate the error. ERRORS
The makedev() function will fail if: EINVAL One or both of the arguments maj and min is too large, or the device number created from maj and min is NODEV. The major() function will fail if: EINVAL The device argument is NODEV, or the major number component of device is too large. The minor() function will fail if: EINVAL The device argument is NODEV. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mknod(2), stat(2), attributes(5) SunOS 5.10 29 Dec 1996 makedev(3C)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

stuck....!

I have been busy reading away on devices and filesystems and I am stuck on a particular subject matter.. I'm not understanding the concept behind mknod mkfifo makedev or related commands.. can anyone shed some light on the subject.! any feedback welcome! moxxx68 (0 Replies)
Discussion started by: moxxx68
0 Replies

2. UNIX for Dummies Questions & Answers

How to reuse same major number

Hi, I am working on device drivers.Once If register a device i'll get one major no. If i unregister and register again i'll get a different major no.What i have to do to get same major no. each time :( (0 Replies)
Discussion started by: Agnello
0 Replies

3. UNIX for Dummies Questions & Answers

compare 2 very large lists of different length

I have two very large datasets (>100MB) in a simple vertical list format. They are of different size and with different order and formatting (e.g. whitespace and some other minor cruft that would thwart easy regex). Let's call them set1 and set2. I want to check set2 to see if it contains... (2 Replies)
Discussion started by: uiop44
2 Replies

4. AIX

VG major number in HACMP

HI All, I would like to know is it compulsory to keep major number of shared VG's on cluster nodes to be same..? I have come across a situation where on one node major number of shared vg is the major number of altinst_rootvg on other node..how to overcome this situation..? shan (3 Replies)
Discussion started by: to_bsr
3 Replies