DEVCLASS_GET_DRIVERS(9)
π DEVCLASS_GET_DRIVERS π
okay bestie, welcome to the Kernel Developer's Manual corner of the internet β this one is devclass_get_drivers(9) and it's literally the "hey, who's in this club?" function for your devclass β¨
β¨ NAME β¨
devclass_get_drivers β get a list of drivers in a devclass π«Ά
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/bus.h>
int
devclass_get_drivers(devclass_t dc, driver_t ***listp, int *countp);
π DESCRIPTION π
so basically? you hand it a devclass and it goes and collects a list of pointers to all driver instances currently in the devclass. iconic behaviour, no notes.
it drops that list into *listp π and the number of drivers in the list into *countp π
π¨ bestie listen β the memory allocated for the list needs to be freed withfree(*listp, M_TEMP), and yes, even if*countpis 0. don't skip it just because the count is zero, that's the trap, that's the vibe check you fail π
β RETURN VALUES β
Zero is returned on success π β otherwise, an appropriate error is returned. that's it, that's the deal, fr fr.
π¦ SEE ALSO π¦
go read those next, iykyk πΈ
π AUTHORS π
This manual page was written by Nate Lawson. thank you king π«Άβ¨
mwah β this one came from the Debian crew, dated May 19, 2005 (yes, a vintage baddie, we respect the archive π). now go free your list, bestie. no cap. π§ββοΈπ
π¦ 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) 2005 Nate Lawson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms