DEVICE_ENABLE(9)
π DEVICE_ENABLE(9) π
okay so bestie, we're in the Kernel Developer's Manual today and this page is literally about the three little functions that flip a device's enabled flag on and off. it's giving "tiny but powerful" energy. π
β¨ SYNOPSIS β¨
first things first, you gotta pull in the headers, no cap:
#include <sys/param.h>
#include <sys/bus.h>
and then here are the three icons themselves:
void
device_enable(device_t dev);
void
device_disable(device_t dev);
int
device_is_enabled(device_t dev);
πΈ DESCRIPTION πΈ
okay so picture this: every single device out there has an enabled flag attached to it. that's just how it is. π
when a device gets created, it's enabled by default β like, automatically, no effort needed, main character energy from day one. β¨ but you can disable it, and honestly there are legit reasons to! for instance, to prevent a destructive or time consuming probe attempt. π yeah. you don't want that happening.
so here's the vibe check on which function does what:
device_disable()β call this one to disable a device. bye bestie πdevice_enable()β call this one to re-enable it. welcome back queen πdevice_is_enabled()β call this one to test whether a device is enabled or not. the vibe check function, fr fr π¦
that's it. that's the whole thing. lowkey iconic.
π₯ SEE ALSO π₯
device(9)β go read this one too, iykyk
π«Ά AUTHORS π«Ά
this manual page was written by Doug Rabson. legend behavior honestly. π
Debian π June 16, 1998 β yeah she's vintage bestie, but she still slays πβ¨ mwah, go enable some devices π§π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- 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