BUS_GENERIC_SHUTDOWN(9)
π BUS_GENERIC_SHUTDOWN π
okay bestie, so this is a page from the Kernel Developer's Manual β yes it's giving very serious grown-up kernel energy but we're gonna make it cute anyway, because you deserve to understand it π«Ά
β¨ NAME β¨
bus_generic_shutdown β the generic implementation of DEVICE_SHUTDOWN for buses. literally the plug-and-play version, no cap π
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/bus.h>
int
bus_generic_shutdown(device_t dev);
so you pull in those two headers and then you've got a function that takes one device_t named dev and hands you back an int. that's it. that's the whole vibe check β¨
π DESCRIPTION π
okay so here's the tea π
This function provides an implementation of the DEVICE_SHUTDOWN(9) method which can be used by most bus code.
and when I say it provides an implementation, bestie, I mean it's the low-effort icon β it doesn't do anything fancy. It simply calls the DEVICE_SHUTDOWN(9) method of each child device attached to the bus.
like, that's literally the whole job. it goes down the list of every child device hanging off that bus and tells each one "hey, we're shutting down, do your thing" π one by one. no drama, no extra steps, just delegation. main character energy but for buses π
π RETURN VALUES π
Zero is returned on success, otherwise an appropriate error is returned.
translation: 0 means we ate and everything's fine π
anything else means something went sideways and you're getting an error back instead. not me being vague about which error β the page says "an appropriate error", so that's what we're saying, periodt.
π¦ SEE ALSO π¦
go read those too, iykyk, they're the supporting cast and they're iconic in their own right π
π AUTHORS π
This manual page was written by Doug Rabson. shoutout Doug, absolute legend, we love a kernel dev who documents their work π«Άβ¨
and that's the whole page bestie, you're officially caught up π go forth and shut down some buses (responsibly!!) ππ¨
Debian β’ January 15, 2017 β’ BUS_GENERIC_SHUTDOWN(9) β mwah, bye!! ππ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1998 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms