---
name: "uminor"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/uminor"
---

# uminor(9)

calculate device ids

## NAME

**device\_ids**, **major**, **minor**, **umajor**, **uminor** – calculate device ids

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<sys/systm.h\>**

*int*\

**major**(*struct cdev \*dev*);

*int*\

**minor**(*struct cdev \*dev*);

*int*\

**umajor**(*dev\_t id*);

*int*\

**uminor**(*dev\_t id*);

## DESCRIPTION

The **device\_ids** family of functions take either the raw device ID, *id*, or a pointer to the device structure, *dev*, and return the integer value that is the major or minor device ID as requested.

The actual major and minor device IDs are values masked from of the raw device ID. For details on the actual calculations used to determine the major or minor IDs see the actual source in *kern\_conf.c*.

## RETURN VALUES

An integer greater than zero and less than NUMCDEVSW. **major**() and **minor**() will return NODEV if the device is invalid.

## AUTHORS

This manual page was written by Chad David ⟨davidc@acns.ab.ca⟩.
