makedev man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

MAKEDEV(3C)							   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 argu‐
       ment 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  num‐
       ber.   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)

				 Dec 29, 1996			   MAKEDEV(3C)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net