DEVCLASS_GET_DEVICE(9)
π DEVCLASS_GET_DEVICE π
okay bestie, welcome to the Kernel Developer's Manual corner of the internet, where we're talking about devclass_get_device β literally the glow-up translator between unit numbers and actual device instances. no cap. β¨
πΈ NAME πΈ
devclass_get_device β translate unit number to device
like, that's the whole job. number in, device out. iconic.
π SYNOPSIS π
#include <sys/param.h>
#include <sys/bus.h>
device_t
devclass_get_device(devclass_t dc, int unit);
yes bestie, both headers, don't skip one, that's the vibe check π¦
β¨ DESCRIPTION β¨
so this function retrieves the device instance that has the given unit number, and returns it. that's it. that's the function. she does one thing and she does it well. π
you hand her a devclass_t dc and an int unit, and she goes and finds the matching device instance for you. main character energy, honestly. π
π RETURN VALUES π
- if the device exists, it gets returned to you π«Ά
- otherwise, you get
NULLπ
that's the whole deal. no in-between. no half-returns. just device or NULL.
π SEE ALSO π
go read those too, iykyk π
π¦ AUTHORS π¦
This manual page was written by Doug Rabson. π«‘ absolute legend behavior.
Debian β June 16, 1998 β that's the version/date stamp on this one bestie, from the DEVCLASS_GET_DEVICE(9) page in the Kernel Developer's Manual. mwah, go forth and translate those unit numbers ππβ
π¦ 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