BUS_HINTED_CHILD(9)

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

πŸ’… BUS_HINTED_CHILD(9) β€” the kernel developer's manual, bestie edition πŸŽ€

okay so real quick, before we dive in: this is a page from the Kernel Developer's Manual, and it's about BUS_HINTED_CHILD(9). yes the name is giving "scary kernel thing" but honestly? it's lowkey just a little notifier. let's get into it ✨


🌸 NAME 🌸

BUS_HINTED_CHILD β€” the method that tells a bus device "hey girl, there might be a potential child device over here, and the hints said so" 🫢


✨ SYNOPSIS ✨

like always, you gotta bring the right headers to the function or it's not gonna know you:

#include <sys/param.h>
#include <sys/bus.h>

void
BUS_HINTED_CHILD(device_t dev, const char *dname, int dunit);

πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie πŸ“ β€” the BUS_HINTED_CHILD() method gets invoked by the bus_enumerate_hinted_children(9) function. and when does it get invoked, you ask? once for each set of named hints whose at hint matches the bus device dev. like, for every single one. no skipping, no shortcuts. πŸ‘‘

typically, this method should figure out if the set of hints for the given device name and unit sufficiently describes a new device. that's the vibe check it's running. and if the answer is yes? slay. a new device should be added via BUS_ADD_CHILD(9). periodt. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, iykyk πŸ“šβœ¨


🌈 HISTORY 🌈

the BUS_HINTED_CHILD() method first appeared in FreeBSD 6.2. iconic behavior honestly, she's been doing this since forever πŸ‘‘


and that's the whole page, bestie, you ate that 🫢 this little beauty comes to you from Debian, dated February 5, 2025 β€” go forth and hint those children responsibly πŸ’œπŸŽ€

πŸ“¦ where this page comes from