---
name: "device_find_child"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/device_find_child"
---

# device\_find\_child(9)

search for a child of a device

## NAME

**device\_find\_child** – search for a child of a device

## SYNOPSIS

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

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

*device\_t*\

**device\_find\_child**(*device\_t dev*, *const char \*classname*, *int unit*);

## DESCRIPTION

This function looks for a specific child of dev with the given *classname* and *unit*. If *unit* is -1, it returns the first child of *dev* with a matching *classname* (that is, the one with the lowest unit).

## RETURN VALUES

If it exists, the child device is returned, otherwise NULL.

## SEE ALSO

[device\_add\_child(9)](/device_add_child/9.md)

## AUTHORS

This manual page was written by Doug Rabson.
