MAKEDEV(3) BSD Library Functions Manual MAKEDEV(3)NAME
makedev, major, minor -- device number conversion
SYNOPSIS
#include <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.
All block and character devices are uniquely identified by a pair of major and minor numbers. The major number refers to a certain device
class (e.g. disks, TTYs) while the minor number identifies an instance within the device class.
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 int.
SEE ALSO mknod(2), devname(3), MAKEDEV(8)BSD April 1, 2011 BSD
Check Out this Related Man Page
MAKEDEV(3) Linux Programmer's Manual MAKEDEV(3)NAME
makedev, major, minor - manage a device number
SYNOPSIS
#define _BSD_SOURCE
#include <sys/types.h>
dev_t makedev(int maj, int min);
int major(dev_t dev);
int minor(dev_t dev);
DESCRIPTION
A device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a
device in that class. A device ID is represented using the type dev_t.
Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be
given to mknod(2), for example.
The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components.
These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).
CONFORMING TO
The makedev() major() and minor() functions are not specified in POSIX.1, but are present on many other systems.
NOTES
These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(3),
gnu_dev_major(3), and gnu_dev_minor(3). The latter names are exported, but the traditional names are more portable.
SEE ALSO mknod(2), stat(2)COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-12-01 MAKEDEV(3)
Hi All,
I want to know the OS level differences between AIX, Solaris, HP-UX, Linux
Apart from the vendor, H/w and command differences, any other significant points.
regards,
guru Charan (9 Replies)
Last week our server went down. I narrowed it down the the hard drive. I received a new drive but I REALLY need some info off the old drive. I want to get the old drive up long enough to do a dd copy. Here's what I tried..............
After trying to freeze the old drive (wasn't spinning up) to... (4 Replies)
Hi all, dummy here.... I have major errors on entering the shell. On login I get:
-bash: dircolors: command not found
-bash: tr: command not found
-bash: fgrep: command not found
-bash: grep: command not found
-bash: grep: command not found
-bash: id: command not found
-bash: [: =: unary... (12 Replies)
would like to order this input based on major.minor.release AND build number
Label abc_def_0.0.3_build_999 2008/08/01 'Created by me.'
Label abc_def_0.0.9_build_1000 2008/08/01 'Created by me.'
Label abc_def_9.0.9_build_10001 2008/08/01 'Created by me.'
Label abc_def_10.9.100_build_2... (4 Replies)
dam i stuck i am trying to write a script that is a basic phone book so i can enter a name or number or both into the scripts and by
using positional paramiters the script will check if the name has a number in it and warn that numbers are not allowed with names, if i
enter a number then... (6 Replies)
Hi,
I have line like this :
proj_name/module/trunk/module_1_0
where the first "1" refers to major version and second "0" refers to minor version.
any AWK or command like that so that I can filter out the major and minor ?
like major= command | input line
minor= command |... (4 Replies)
Hi, I would like to know what kind of UNIX major investment banks tend to use? I want to try to get a job with one of these places. By major, I mean big companies like Citigroup, JP Morgan Chase, Morgan Stanley, etc. Thanks. (5 Replies)
Got a problem booting my Solaris 2.7 machine.
Get pages and pages of error messages complaining about invalid line 2 in /etc/major_to_minor and then a few pages complaining about errors in /etc/driver_aliases.
Then it aborts with an MMU error and kicks back to OK> prompt.
Managed to boot... (10 Replies)
Hi friends, Please let me know if there is any way to find out Major and Minor numbers of virtual file system like below:
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K ... (8 Replies)
I want to remove all rows with a minor repeating count less than 30% compared to the major repeating count from my table. The values of a col(starting col 2) can assume is A,T,G,C and N. Each row has at least 2 values and at most 4 repeating values(out of ATGC).
N is considered a missing value... (12 Replies)
Dear fellow *nixers,
please join me congratulating Corona688 for reaching the lonesome, lorn landmark of 4500 thanks! What an achievement in the gruelling ordeal of servicing these fora.
Incredible. All the best
RĂ¼diger (9 Replies)
Regarding the latest version of the UserCP prototype (version 0.63) I have made a lot of major changes, including
Added a "Posts Timeline" table for the recent posts, complimenting the non-table version earlier, which has been moved off the main menu (link at the bottom of the table).
Added a... (4 Replies)