DEVICE_FIND_CHILD(9)
okay bestie, welcome to the device_find_child(9) page from the kernel developer's manual β we're looking for a child device and yes, it's exactly as iconic as it sounds π
π 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 is on a mission: it looks for a specific child of dev that has the given classname and unit π
And when unit is -1, it returns the first child of dev with a matching classname β that is, the one with the lowest unit. No cap, that's the whole vibe check π₯
β RETURN VALUES β
If it exists, the child device is returned. Otherwise, you get NULL π
π SEE ALSO π
π AUTHORS π
This manual page was written by Doug Rabson π
cute sign-off time, bestie: the footer deets are Debian, February 8, 2005, and DEVICE_FIND_CHILD(9) β slay and goodbye π«Άβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1998 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms