DEVICE_FIND_CHILD(9)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

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