BUS_GENERIC_PRINT_CHILD(9freebsd)

πŸ’– BUS_GENERIC_PRINT_CHILD(9) πŸ’–

okay bestie, so this is a page from the Kernel Developer's Manual, and it's about bus_generic_print_child β€” the generic implementation of DEVICE_PRINT_CHILD for buses. yes we are in the kernel. yes we are thriving. ✨


🌸 NAME 🌸

bus_generic_print_child β€” the generic implementation of DEVICE_PRINT_CHILD for buses. it's giving "one function to announce them all". πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

int
bus_generic_print_child(device_t dev, device_t child);

like. two includes and one little function. no cap. πŸ¦‹


✨ DESCRIPTION ✨

so what does it do, you ask? this implementation prints out the default device announcement message. that's it, that's the whole vibe. 🌈

okay let's get concrete. say you've got a device called foo0 sitting on a bus called bar0, and foo0 has the name "FooCard 1234". what gets printed is literally this:

foo0: <FooCard 1234> on bar0

iconic honestly. 😭

and here's the tea: bus_generic_print_child itself calls two functions β€” bus_print_child_header() and bus_print_child_footer(). the former prints "foo0: <FooCard 1234>" and the latter prints "on bar0". so if bus_generic_print_child() doesn't completely suit your needs, you should use these routines in your own code if possible. that's the assignment, bestie. πŸ“


πŸ”₯ RETURN VALUES πŸ”₯

the number of characters output. that's it. that's the return value. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ AUTHORS πŸ‘‘

this manual page was written by Doug Rabson. we love a legend. πŸ’œ


slay, you made it to the end, bestie!! πŸŽ€ this page came to you from the Debian distribution, dated January 15, 2017, and it's filed under BUS_GENERIC_PRINT_CHILD(9). go print some children. responsibly. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from