BUS_GENERIC_DETACH(9)
β¨ 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
- 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