---
name: "device_get_unit"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/device_get_unit/9freebsd"
---

# device\_get\_unit(9freebsd)

access the unit number of a device

## NAME

**device\_get\_unit** – access the unit number of a device

## SYNOPSIS

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

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

*int*\

**device\_get\_unit**(*device\_t dev*);

## DESCRIPTION

Return the unit number of the device.

## SEE ALSO

[device(9)](/device/9.md)

## AUTHORS

This manual page was written by Doug Rabson.
