BUS_GENERIC_DETACH(9)

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

✨ NAME ✨

okay bestie, this is BUS_GENERIC_DETACH(9) from the Kernel Developer's Manual, and it's literally the generic implementation of DEVICE_DETACH for buses πŸ’…

bus_generic_detach β€” generic implementation of DEVICE_DETACH for buses

πŸŽ€ SYNOPSIS πŸŽ€

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

int
bus_generic_detach(device_t dev);

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function gives you an implementation of the DEVICE_DETACH(9) method that most bus code can use. no cap.

it uses bus_detach_children(9) to detach drivers from all child devices, and it gives them a chance to veto the detach request β€” yes, they can absolutely say β€œnot today” πŸ™ˆ.

if bus_detach_children() succeeds, then bus_generic_detach() calls device_delete_children(9) to delete all child devices. iconic cleanup behavior, honestly ✨.

πŸ’– RETURN VALUES πŸ’–

Zero is returned on success. otherwise, an appropriate error is returned. that's the vibe check, fr fr 🫢.

🌈 SEE ALSO 🌈

πŸ‘‘ AUTHORS πŸ‘‘

this manual page was written by Doug Rabson πŸ’œ.


and that's the whole page, bestie β€” this one's from Debian, dated February 5, 2025 🌸✨

πŸ“¦ where this page comes from