DEVICE_PROBE_AND_ATTACH(9freebsd)
β¨ DEVICE_PROBE_AND_ATTACH(9) β¨
okay bestie, this is a page from the Kernel Developer's Manual (section 9, the β¨deep loreβ¨ section), and it's all about a little function called device_probe_and_attach. it's giving "matchmaker for hardware" energy, and honestly? iconic. π
πΈ NAME πΈ
device_probe_and_attach β initialise a device π«Ά
π SYNOPSIS π
#include <sys/param.h>
#include <sys/bus.h>
int
device_probe_and_attach(device_t dev);
π DESCRIPTION π
so this function gets called during autoconfiguration, which is basically the kernel's whole "getting ready" montage β¨ β its job is to initialise the devices in the system, one by one.
here's the vibe, step by step, no skipping:
- for each device, the
DEVICE_PROBE(9)method of each suitable driver gets called π - if a probe succeeds, a description of the device gets printed π¨οΈ (yes, the kernel is showing off, let it)
- then the
DEVICE_ATTACH(9)method is called πͺ
and one very important caveat bestie: if the device is disabled using device_disable(9), then it will not be probed. periodt. no probe for you, bestie. π
β RETURN VALUES β
0β success, slay, we love to see it π- anything else β an appropriate error is returned π
π SEE ALSO π
π¦ AUTHORS π¦
this manual page was written by Doug Rabson. king behaviour, fr fr π
and that's the whole page bestie, we ate and left no crumbs π
β cute little sign-off time: this one came from Debian, dated June 16, 1998 (a vintage classic, lowkey older than us but still serving π), and it lives at DEVICE_PROBE_AND_ATTACH(9). mwah, go probe something β¨π«Ά
π¦ 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