BUS_GENERIC_SHUTDOWN(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… BUS_GENERIC_SHUTDOWN(9) β€” from the Kernel Developer's Manual, bestie

okay so this is the manual page for bus_generic_shutdown, and it's lowkey one of the most chill functions in the whole kernel. it lives in the Kernel Developer's Manual section 9, and i'm gonna walk you through it like we're texting at 2am. πŸŽ€


✨ NAME ✨

bus_generic_shutdown β€” the generic implementation of DEVICE_SHUTDOWN for buses, fr fr


🌸 SYNOPSIS 🌸

the include vibes first, always:

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

and then the function itself, iconic:

int
bus_generic_shutdown(device_t dev);

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function? it provides an implementation of the DEVICE_SHUTDOWN(9) method that can be used by most bus code β€” it's giving "one size fits most" and honestly it ate. πŸ’…

the way that it works is genuinely so simple: it just calls the DEVICE_SHUTDOWN(9) method of each child device attached to the bus. that's it. that's the whole thing. no extra steps, no drama, just passing the shutdown energy down to every child. πŸ‘‘

like, main character energy but make it delegation. 🫢


⭐ RETURN VALUES ⭐

  • Zero is returned on success ✨
  • otherwise, an appropriate error is returned 😭

πŸ”₯ SEE ALSO πŸ”₯

iykyk, go read those next, bestie. πŸ“š


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Doug Rabson. shoutout to Doug, the real one. πŸ™Œ


and that's the whole page, periodt. this beauty came out of Debian on January 15, 2017, so it's got that vintage 2017 aesthetic going on β€” still slaying to this day. bye bestie, go shut down some buses (the kernel kind, not the school kind) πŸ’–πŸŒˆπŸ§š

πŸ“¦ where this page comes from