DEVICE_ENABLE(9)

πŸ’– DEVICE_ENABLE πŸ’–

okay bestie, welcome to the Kernel Developer's Manual, section 9 β€” yes we're in the deep end and yes you're gonna slay it 🫢


✨ NAME ✨

device_enable, device_disable, device_is_enabled β€” the lil trio that manipulates a device's enabled flag πŸ’…


🌸 SYNOPSIS 🌸

#include <sys/param.h>
#include <sys/bus.h>

void
device_enable(device_t dev);

void
device_disable(device_t dev);

int
device_is_enabled(device_t dev);

πŸ¦‹ DESCRIPTION πŸ¦‹

so literally every single device has an enabled flag attached to it, like a little vibe check it carries around at all times ✨

A device is enabled by default when it gets created β€” that's its factory setting, its main character era πŸ‘‘. But it can be disabled, bestie. why would you do that? for instance, to prevent a destructive or time consuming probe attempt 😭 yeah, you heard me. sometimes the probe is giving chaos and you gotta shut it down before it eats your whole afternoon.

So here's the roster, no cap:

  • wanna disable a device? call device_disable()
  • wanna re-enable it? call device_enable()
  • wanna know if it's enabled at all? call device_is_enabled() and it'll tell you fr fr πŸ’–

that's it. that's the whole vibe. three functions, one flag, endless peace of mind 🧚


🌈 SEE ALSO 🌈


πŸ’œ AUTHORS πŸ’œ

This manual page was written by Doug Rabson. iconic behavior honestly, thank you king πŸŽ€


okay that's the whole page!! this was the DEVICE_ENABLE(9) joint from the Kernel Developer's Manual, Debian edition, dated June 16, 1998 ⭐ like... a literal vintage. a classic. we stan a legacy manpage πŸ“

bye bestie, go enable something πŸ’…βœ¨

πŸ“¦ where this page comes from