BUS_GENERIC_SHUTDOWN(9)
π 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
- 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